diff --git a/demos/bee-pollinator/README.md b/demos/bee-pollinator/README.md index db0359f..d3e6d3a 100644 --- a/demos/bee-pollinator/README.md +++ b/demos/bee-pollinator/README.md @@ -4,25 +4,15 @@ A demonstration of the Databricks [Multi-Agent Supervisor](https://docs.databric ## Architecture -``` -User Question - | - v -┌─────────────────────────┐ -│ Supervisor Agent │ -│ "Bee Colony Health │ -│ Advisor" │ -└─────┬──────────┬─────────┘ - │ │ - v v -┌──────────┐ ┌──────────────┐ -│ Genie │ │ Knowledge │ -│ Space │ │ Assistant │ -│ │ │ │ -│ 3 USDA │ │ 4 beekeeping │ -│ tables │ │ PDFs │ -└──────────┘ └──────────────┘ -``` +![architecture](./images/bee_colony_health_pollinator.svg) + +A **Supervisor Agent** intelligently routes user queries to two specialized subagents: + +| Subagent | Purpose | Databricks Component | +|----------|---------|---------------------| +| **Genie Agent** | Structured data for bee colonoies queries (SQL, stats, trends) | **Genie Space** → Unity Catalog table | +| **Knowledge Assistant** | Covers varroa mite management, pollinator conservation, agricultural habitat, and native plant guides. | **AgentBricks Knowledge Assistant** → Vector Search index | +| **Synthesizer** | Routes, delegates, synthesizes responses from both subagents | **AgentBricks Supervisor Agent** | **Structured data (Genie):** ~13,500 rows of real USDA NASS data — honey production, colony loss rates, and colony stressors by state/year (2015-2025). @@ -39,7 +29,17 @@ See [docs/DATA_SOURCES.md](docs/DATA_SOURCES.md) for full sourcing, licensing, a ## Setup -### Step 1: Deploy and run the bundle (~10 minutes) +### Step 1: Create a SQL Warehouse +In your Databricks workspace, navigate to the SQL Warehouses section. + +1. Select the warehouse you want to use. If you don't have one, create a new one. +Click on the SQL warehouse you wish to use with Genie. + +2. Copy the warehouse ID: +You can find the warehouse ID either in the URL when you select the warehouse, or on the warehouse details page. +You will need its warehouse_id for the next step. + +### Step 2: Deploy and run the bundle (~10 minutes) ```bash cd demos/bee-pollinator @@ -63,7 +63,7 @@ This creates 3 Delta tables, uploads 4 PDFs to a UC Volume, and creates a Genie | `schema` | `bee_pollinator` | Schema for demo tables | | `warehouse_id` | — (required) | SQL Warehouse ID for Genie Space | -### Step 2: Create the Supervisor Agent (~5 minutes) +### Step 3: Create the Supervisor Agent (~5 minutes) The Supervisor Agent has no API yet, so this step is done in the UI. @@ -74,7 +74,7 @@ The Supervisor Agent has no API yet, so this step is done in the UI. - **Description:** `Routes questions about bee colony health between USDA statistical data and beekeeping guidance documents` - **Add Agents:** - Click **Add Agent** and select **`USDA Bee Health Data`** (Genie Space) - - Click **Add Agent** again and select **`Bee Health Documents`** (Knowledge Assistant) + - Click **Add Agent** again and select **`Bee Health Documents`** (Knowledge Assistant via Agent Endpoint) - **Instructions:** ``` @@ -96,7 +96,7 @@ When synthesizing from both agents, connect the data insight to the document gui 4. Click **Save** / **Deploy** -### Step 3: Verify +### Step 4: Verify Confirm in the Databricks UI: - **Data** > your catalog > your schema: 3 tables (`honey_production`, `colony_loss`, `colony_stressors`) and a `guidance_docs` volume with 4 PDFs diff --git a/demos/bee-pollinator/images/bee_colony_health_pollinator.svg b/demos/bee-pollinator/images/bee_colony_health_pollinator.svg new file mode 100644 index 0000000..c0620f0 --- /dev/null +++ b/demos/bee-pollinator/images/bee_colony_health_pollinator.svg @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MLflow TRACING & OBSERVABILITY + + + + + + + + + + User Query + + + + + + + + + + + + + + + + + + + + Bee Colony Health Advisor + Supervisor Agent + LLM Classification | Route | Delegate | Synthesize + + + + + + + "statistical" + + + + + + "guidance" + + + + + "both" + + + + + + + + + + + + + + + + Genie Space + Structured Data Agent | ~13.5K rows + + + + Honey Production + + Colony Counts + + + + Colony Loss Rates + + Stressor Analysis + + + + + + + + + + + + + + Knowledge Assistant + Document Retrieval | 4 PDFs (~140 pages) + + + + Varroa Mite Mgmt + + Conservation + + + + Habitat Creation + + Native Plants + + + + + + + + + + + + + + + + + + + Synthesizer + Unified Actionable Recommendations + + + + + + Delta Tables (Unity Catalog) + + + + + + + + UC Volume (guidance_docs) + + + + + + + + + 1 + Built-in Scorers + + + + + 2 + Routing Accuracy + + + + + 3 + Agent-as-a-Judge + + + + EVALUATION + + + BEE COLONY HEALTH & POLLINATOR SUPERVISOR PATTERN + + + + + AgentBricks + + MLflow 3.x + + Genie Space + + Unity Catalog + + USDA NASS Data + + \ No newline at end of file