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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Extras: `labagent[rag]` (Databricks RAG), `[rag-local]` (laptop RAG), `[rag-lab]
|---|---|---|
| `azure-labs` | Copy Azure VMs, disks and network from one resource group to another with snapshots, or snapshot a dead VM or disk. Source is read-only. An Azure Lab Services alternative. [Guide](docs/azure-labs.md) | Azure (needs `az login`) |
| `rag-sec-tutorial` | Nine notebooks: RAG on SEC 10-K filings with embeddings, pgvector, hybrid search, citations, an evaluation gate, a deployed app | Databricks Free Edition |
| `db-agent` | [db-agent](https://github.com/db-agent/db-agent) text-to-SQL app on Databricks Apps, pinned commit | Databricks Free Edition |
| `db-agent` | [db-agent](https://github.com/db-agent/db-agent) text-to-SQL app on Databricks Apps, pinned commit. [Which model, warehouse and schema it picks](docs/packs.md) | Databricks Free Edition |
| `dbx-lakehouse` | Medallion lakehouse (bronze, silver, gold) from real open data, with masks, a row filter, notebooks and exercises. [Guide](docs/dbx-lakehouse.md) | Databricks Free Edition, AWS, Azure |
| `dbx-workspace` | Premium Databricks workspace via Terraform. Plan only unless `apply=yes`. [Guide](docs/dbx-workspace.md) | AWS or Azure (costs money) |
| `aml` | Synthetic anti-money-laundering lab with an answer key: RAG for developers, Microsoft 365 Copilot for staff. [Guide](docs/aml.md) | Your machine |
Expand Down
6 changes: 5 additions & 1 deletion docs/packs.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ labagent destroy db-agent --name demo
Steps: `preflight` (login, SQL warehouse, sample data, serving endpoints), `fetch` (pinned commit), `token`, `app`, `verify`
(asks a real question through the deployed app: this proves the token, warehouse, LLM and SQL safety layer work together).

- **Pinned code.** `ref` must be a full commit SHA, and the clone is refused if HEAD differs. To move to a newer db-agent, review it and change the pin.
- **What it picks.** Chat model: `--param chat_endpoint`, else the first serving endpoint named like `llama|gpt|claude|gemma|qwen|instruct|chat`. Embedding model:
`--param embedding_endpoint`, else the first named like `gte|bge|embed`. The app calls `<workspace host>/serving-endpoints` with its token. Data: `catalog` (default `samples`)
and `dataset` (default `bakehouse`); preflight fails with the list of schemas if it is missing. Warehouse: `--param warehouse` (id or name), else the first one.
These are first-match guesses: pass the names yourself when the workspace has several. Preflight records the choices as `chat_endpoint`, `embedding_endpoint` and `warehouse_id`.
- **Pinned code.** `ref` must be a full commit SHA, and the clone is refused if HEAD differs. To move to a newer db-agent, review it and change the pin (`PINNED` in `labagent/packs/db_agent/pack.py`), or try one commit with `--param ref=<full SHA>`.
- **Data.** The `samples` catalog already exists in every workspace, so nothing is downloaded or redistributed.
- **Credential.** The app needs a token for the warehouse and the LLM. labagent creates one with a 30-day lifetime (`--param token_days`), stores it
only as an app secret (via stdin, never on a command line, in state or in output), and `destroy` revokes it. If your workspace blocks
Expand Down
2 changes: 1 addition & 1 deletion labagent/packs/db_agent/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from ..databricks.models import CHAT_RE, EMBED_RE

REPO = "https://github.com/db-agent/db-agent"
PINNED = "eef0a308d052b6bdd00fdfec7ee1c9a61c01426f" # reviewed commit; change it deliberately (see docs/packs.md)
PINNED = "15150ab87b2d50ed8fee71408afbd2f6aba54a14" # reviewed commit; change it deliberately (see docs/packs.md)
SECRET_KEY = "token"
SMOKE_QUESTION = "How many customers are there?"
IGNORE = shutil.ignore_patterns("node_modules", "dist", ".env", ".env.*", "knowledge.json", "*.log", "__pycache__")
Expand Down
Loading