← ClaudeAtlas

how-to-agentic-on-your-warehouselisted

Put a text-to-SQL agent on a warehouse without putting a wrong number in the board pack - ground it on a signed-off metric registry, keep every number the model reports traceable to a real executed result row, and let a deterministic five-check gate reconcile each answer against the trusted definition before anyone sees it. Use when asked to "let people ask the warehouse questions", "build a text-to-SQL agent", "chat with our data", "natural language BI", "why does the AI give different numbers than the dashboard", or when an analytics agent has to survive a finance review. Walks the 6-step pipeline - input, sample data, objective, find-skills, build (registry + agent + gate + retry loop), expert review - and outputs a runnable agent plus a captured fail-to-fix transcript, not a demo.
phoebefu6/phoebe-data-skills · ★ 1 · AI & Automation · score 72
Install: claude install-skill phoebefu6/phoebe-data-skills
# how-to-agentic-on-your-warehouse Gen-AI-layer skill (layer 4 of the phoebe-data-skills 4-layer roadmap). It sits on top of a modeled warehouse and answers business questions in English. The demo version of this is easy and worthless. A model writes syntactically perfect SQL against a clean star schema and everybody claps. The problem is that in a real warehouse the traps are **semantic, not syntactic** - the query runs, returns a plausible number, and the number is wrong for reasons that are nowhere in the schema: - **grain** - a fact table is usually one row per order LINE, not per order. `COUNT(*)` is not order volume. - **status** - finance recognizes one status. Summing all of them inflates the money. - **label** - `net_amount` is merchandise value. Platform revenue is that times a commission rate that lives in nobody's schema. - **entity** - registered accounts are not active buyers. None of those raise an error. That is the whole danger. A wrong dashboard gets argued with; a wrong number in fluent English gets pasted into a board deck. Showcase walkthrough (Everrest retail case, real captured transcript): https://github.com/phoebefu6/phoebe-data-skills - `docs/how-to-agentic-on-your-warehouse/` ## Where this sits in the lineage `raw dump -> lake -> warehouse -> marts -> forecast` **-> agent**. Reads the stage-2 DuckDB star schema built by `how-to-schema-and-warehouse`, and reuses the metric definitions signed off in `how-to-metric-to-scorecard`. The regist