Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gen.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"source_commit": "fa7c388d15531622e47f91f4d6341274b5cdc694"
"source_commit": "007006859ac9df636ebfa08d5d25a1d5b59f15e6"
}
6 changes: 2 additions & 4 deletions experimental/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ See the root [README](../README.md) for details on the stable install path.

## Available Skills

### 📊 Analytics & Dashboards
- **databricks-genie-agents** - Genie Agents: natural-language data Q&A, agent authoring, and tuning (example questions, instructions)

### 🔧 Data Engineering
- **spark-python-data-source** - Python data sources for Spark (custom connectors)

Expand All @@ -54,7 +51,8 @@ Most of the original ai-dev-kit snapshot now lives in the stable
flag). See the root [README](../README.md#available-skills) for the full list.
Promoted skills include `databricks-ai-functions`, `databricks-agent-bricks`,
`databricks-aibi-dashboards`, `databricks-apps-python`, `databricks-dbsql`,
`databricks-docs`, `databricks-execution-compute`, `databricks-iceberg`,
`databricks-docs`, `databricks-execution-compute`, `databricks-genie-agents`,
`databricks-iceberg`,
`databricks-lakeflow-connect`, `databricks-metric-views`, `databricks-ml-training`,
`databricks-mlflow-evaluation`, `databricks-python-sdk`,
`databricks-spark-structured-streaming`, `databricks-synthetic-data-gen`,
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions metaplugin/plugin.meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"databricks-dbsql": { "keyword": "dbsql" },
"databricks-docs": { "keyword": "docs" },
"databricks-execution-compute": { "keyword": "execution-compute" },
"databricks-genie-agents": { "keyword": "genie-agents" },
"databricks-iceberg": { "keyword": "iceberg" },
"databricks-lakeflow-connect": { "keyword": "lakeflow-connect" },
"databricks-metric-views": { "keyword": "metric-views" },
Expand Down Expand Up @@ -177,6 +178,7 @@
{ "label": "Vector Search / RAG", "skill": "databricks-vector-search" },
{ "label": "Classic-to-serverless migration", "skill": "databricks-serverless-migration" },
{ "label": "Data discovery / finding & exploring data / natural-language data Q&A / SQL generation (Genie)", "skill": "databricks-data-discovery" },
{ "label": "Genie Agents (formerly Genie Spaces): building, managing & tuning a curated per-data Genie Agent", "skill": "databricks-genie-agents" },
{ "label": "Agent Bricks / Knowledge Assistants / Genie Spaces / Multi-Agent Supervisor", "skill": "databricks-agent-bricks" },
{ "label": "AI Functions (ai_query, ai_classify, ai_extract, ai_parse_document)", "skill": "databricks-ai-functions" },
{ "label": "AI/BI dashboards", "skill": "databricks-aibi-dashboards" },
Expand Down
2 changes: 1 addition & 1 deletion skills/databricks-ai-functions/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ FROM prepped LATERAL VIEW explode(variant_get(prep, '$.document.contents', 'ARRA
Then enable CDF (`ALTER TABLE parsed_chunks SET TBLPROPERTIES (delta.enableChangeDataFeed = true)`) and use the **[databricks-vector-search](../databricks-vector-search/SKILL.md)** skill to build a Delta Sync index: PK `chunk_id`, embedding source `chunk_to_embed`, return `chunk_to_retrieve`.

**Beyond batch:**
- **Ask questions over the output** — point a Genie Agent at the resulting Delta table for natural-language querying instead of hand-written SQL; see the **[databricks-genie-agents](../../experimental/databricks-genie-agents/SKILL.md)** skill.
- **Ask questions over the output** — point a Genie Agent at the resulting Delta table for natural-language querying instead of hand-written SQL; see the **[databricks-genie-agents](../databricks-genie-agents/SKILL.md)** skill.
- **Low-latency / serving** — to expose this as a real-time, governed endpoint (e.g. register a model to Unity Catalog and serve it), use the **[databricks-model-serving](../databricks-model-serving/SKILL.md)** skill.
- **Production incremental ingestion** — for a runnable end-to-end streaming `ai_parse_document` job (checkpoints, `trigger(availableNow=True)`), see [databricks/bundle-examples · job_with_ai_parse_document](https://github.com/databricks/bundle-examples/tree/main/contrib/job_with_ai_parse_document).

Expand Down
28 changes: 18 additions & 10 deletions skills/databricks-data-discovery/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: databricks-data-discovery
description: "Discover, explore, and query Databricks data via Genie — the CLI equivalent of the Genie One MCP. MUST be invoked whenever the user asks to find or locate data ('what tables are in X', 'where does X live', 'which catalog/schema has Y'), answer a natural-language question about the data, or write a SQL query."
compatibility: Requires databricks CLI with the experimental genie command (databricks experimental genie ask)
compatibility: Requires databricks CLI >= v1.9.0 for `databricks genie ask` (older CLIs fall back to the deprecated `databricks experimental genie ask` alias)
metadata:
version: "0.1.0"
parent: databricks-core
Expand All @@ -12,7 +12,7 @@ parent: databricks-core
This skill **routes data work** — decide first:
- the request is about *the data* — finding it, asking questions of it, or
generating SQL → delegate to **Genie One**:
`databricks experimental genie ask -s <session-label> "..."` (see Routing below).
`databricks genie ask -s <session-label> "..."` (see Routing below).
- writing files or anything else → use your own coding-agent tools.

Genie One just needs an authenticated CLI profile (the parent `databricks-core`
Expand Down Expand Up @@ -58,18 +58,25 @@ and reusing it lets later questions build on everything asked so far ("summarize
of the above"). Use a fresh session label only to start a deliberately separate
session, or distinct session labels to run several in parallel.

The command is `databricks genie ask` (CLI >= v1.9.0). On an older CLI it lives
under `databricks experimental genie ask` — same flags and behavior; use that
exact fallback if `databricks genie ask` is not found.

```bash
# Always pass a session label, and reuse the SAME one so follow-ups build on each other
databricks experimental genie ask -s trips "How many bookings were there last week?"
databricks experimental genie ask -s trips "Break that down by destination"
databricks experimental genie ask -s trips "Summarize all of the above"
databricks genie ask -s trips "How many bookings were there last week?"
databricks genie ask -s trips "Break that down by destination"
databricks genie ask -s trips "Summarize all of the above"

# --include-sql also prints the SQL Genie ran (use it to generate a query, too)
databricks experimental genie ask -s trips "Write SQL for the top 5 destinations by revenue" --include-sql
databricks genie ask -s trips "Write SQL for the top 5 destinations by revenue" --include-sql

# --output json gives a parseable result
databricks experimental genie ask -s trips "Top 5 destinations by revenue" --output json
databricks genie ask -s trips "Top 5 destinations by revenue" --output json
# → {"status":"completed","conversation_id":"…","text":"…","tool_calls":[{"name":"execute_sql","sql":"…","title":"…"}]}

# Older CLI (< v1.9.0) — same command under the deprecated experimental alias:
# databricks experimental genie ask -s trips "How many bookings were there last week?"
```

Genie searches across all the data you can see, runs SQL, and streams a grounded
Expand Down Expand Up @@ -110,8 +117,9 @@ set up.
## If Genie One isn't available — manual fallback

Only fall back if Genie One is genuinely unavailable — first **verify** with
`databricks experimental genie ask --help`; don't assume the command is missing.
When Genie One isn't enabled, the CLI is too old to have `experimental genie ask`,
`databricks genie ask --help` (or `databricks experimental genie ask --help` on a
CLI older than v1.9.0); don't assume the command is missing. When Genie One isn't
enabled, the CLI is too old to have either form of `genie ask`,
or Genie can't cover the question, do the discovery yourself with the parent skill's
commands — see **[Manual Data Exploration](../databricks-core/manual-data-exploration.md)**
(keyword search via `information_schema`, `discover-schema`, and `tools query`).
Expand All @@ -130,7 +138,7 @@ the same Genie backend.

## Related Skills

- **databricks-genie-agents** (experimental) — build and manage **Genie Agents**: curated
- **databricks-genie-agents** — build and manage **Genie Agents**: curated
agents that let you or a group ask questions of specific data (create, configure,
import/export).
- **databricks-core** (parent) — CLI auth, profiles, and the manual data exploration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: databricks-genie-agents
description: "Create, manage, and query Databricks Genie Agents — curated, per-data natural-language agents (formerly Genie Spaces): build, export/import, migrate across workspaces, and ask questions of a *specific* Agent via the Conversation API. For general data questions or finding data across your workspace, use databricks-data-discovery (Genie One) instead."
compatibility: Requires databricks CLI (>= v1.0.0)
metadata:
version: "0.0.1"
version: "0.1.0"
---

# Databricks Genie Agents
Expand Down Expand Up @@ -101,6 +101,10 @@ databricks genie create-space --json "{

### Improving a Genie Agent

**Recommendation-first:** when asked to optimize, tune, or fix an Agent (or its queries/tables), start by diagnosing and presenting a recommended change — do not run mutating actions (`update-space`, `ALTER`, `OPTIMIZE`, liquid clustering, warehouse changes) until the user approves. Diagnose with read-only queries only.

**Wrong filter values** (Genie filters on a value that returns nothing — e.g. asking for `cancelled` when the column stores a different code or casing): fix with prompt matching / synonyms mapping the user's term to the actual categorical value, not a hardcoded text instruction.

When Genie answers are inaccurate or incomplete, improve the agent by updating questions, SQL examples, or instructions:

```bash
Expand Down Expand Up @@ -129,6 +133,7 @@ The `serialized_space` field is a JSON string containing the full space configur
- **Sort order matters:** `data_sources.tables` must be sorted by `identifier`, and each table's `column_configs` must be sorted by `column_name`; `example_question_sqls` and `text_instructions` must be sorted by `id`. (`sample_questions` is silently re-sorted server-side.)
- **`text_instructions` accepts at most one item** — the API rejects more than one (`text_instructions must contain at most one item`). Merge all guidance (persona, table guide, investigation flow, answer style) into a single entry.
- **Simple ID scheme that satisfies both rules:** prefix per list + monotonic counter, total 32 hex chars — `1…0001`, `1…0002` for `sample_questions`; `2…0001`, `2…0002` for `example_question_sqls`; `3…0001` for `text_instructions`. Authoring order = sort order, no collisions.
- **`benchmarks` is a top-level key** of `serialized_space` (alongside `version`/`config`/`data_sources`/`instructions`), not nested under `instructions`. Each item takes a unique 32-char hex `id`.

### Text Instructions

Expand Down Expand Up @@ -195,7 +200,7 @@ Use `DATABRICKS_CONFIG_PROFILE=profile_name` to target different workspaces.
> **Scope:** use this to query **one specific Genie Agent** — typically to validate an Agent
> after creating or editing it, or to lean on its curated business logic and certified queries.
> For general natural-language data questions or finding data across your workspace, don't use
> this — route to the **[databricks-data-discovery](../../skills/databricks-data-discovery/SKILL.md)**
> this — route to the **[databricks-data-discovery](../databricks-data-discovery/SKILL.md)**
> skill (Genie One) instead.

Ask questions of a specific Agent via three CLI primitives: `start-conversation`, `create-message` (follow-ups), and `get-message` (state + SQL + text). `--no-wait` on `start-conversation` / `create-message` returns immediately with `{conversation_id, message_id}`; poll `get-message` until `.status` is `COMPLETED`, `FAILED`, or `CANCELLED`. Intermediate states you'll see: `SUBMITTED`, `FILTERING_CONTEXT`, `ASKING_AI`, `EXECUTING_QUERY`.
Expand Down Expand Up @@ -239,6 +244,6 @@ On `FAILED`, `get-message` populates `.error.error` with the underlying error st

## Related Skills

- **[databricks-data-discovery](../../skills/databricks-data-discovery/SKILL.md)** - General natural-language data exploration / "ask Genie" (Genie One) across your data; use it when you are not targeting a specific curated Genie Agent
- **[databricks-synthetic-data-gen](../../skills/databricks-synthetic-data-gen/SKILL.md)** - Generate data for Genie tables
- **[databricks-pipelines](../../skills/databricks-pipelines/SKILL.md)** - Build bronze/silver/gold tables
- **[databricks-data-discovery](../databricks-data-discovery/SKILL.md)** - General natural-language data exploration / "ask Genie" (Genie One) across your data; use it when you are not targeting a specific curated Genie Agent
- **[databricks-synthetic-data-gen](../databricks-synthetic-data-gen/SKILL.md)** - Generate data for Genie tables
- **[databricks-pipelines](../databricks-pipelines/SKILL.md)** - Build bronze/silver/gold tables
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading