← Back to Registry Hub/Site Search/L3 · reference_project
⚡Flashcard Drill➔
L3S2 · Data & RetrievalS3 · Model & AgentS4 · UX & HITLS5 · Eval & LLMOpsS6 · Security & FinOpsVerified: 2026-11-30

Semantic-Layer Text-to-SQL RevOps Warehouse Agent (Reference Project)

Production-grade Text-to-SQL capstone pairing dbt semantic metric governance, hybrid Qdrant schema linking, SQLGlot AST read-only & byte-scan guardrails, progressive clarification, and a 60-query execution-accuracy harness.

Best For

Data Engineers, DS-AI, and AI Engineers demonstrating production Text-to-SQL rigor across metric governance, schema linking, and query cost safety.

Human-AI Boundary

Triggers progressive clarification on ambiguous RevOps terms (bookings vs ARR, fiscal vs calendar) and surfaces verifiable SQL + metric lineage cards.

Anti-Patterns to Avoid

  • Stuffing 200 raw DDL CREATE TABLE statements into the prompt without semantic metric definitions or join-graph constraints
  • Executing LLM-generated SQL directly against production warehouses without read-only AST verification, dry-run byte caps, and row-level security

Latency/Cost Profile & Eval Metrics

P50 1.8s / P95 4.1s (schema retrieval + SQL generation + dry-run + warehouse execution) · Schema-linking embeddings + constrained SQL synthesis + bounded warehouse query scan (<500MB/query ceiling)

  • Execution Accuracy (EX) & Metric Definition Fidelity: Baseline raw DDL ~61% -> Semantic Layer + AST Retry >= 92% on 60 RevOps queries (Compares executed result sets against analyst-verified SQL across multi-join ARR/NRR/pipeline cohorts)
  • Unsafe / Cost-Exceeding SQL Block Rate: 100% interception of DML/DDL mutations and >1GB unpartitioned scans before execution (Tested against 20 adversarial prompt-injection and missing-date-filter probes)

📦 Project Deliverables & Portfolio Artifacts

  • dbt / MetricFlow semantic YAML registry + Qdrant hybrid table/column/value-example indexer
  • LangGraph SQL agent with SQLGlot read-only AST validator, tenant RLS injector, and EXPLAIN byte-cap circuit breaker
  • Bounded self-correction loop (max 2 retries on dialect/column errors) + progressive ambiguity clarifier
  • 60-query RevOps benchmark report comparing Raw DDL Prompting vs Semantic Layer + AST Verifier

🎤 Interview Defense & System Design Deep-Dive Q&A

  1. Why does injecting governed semantic layer metrics prevent silent double-counting across 1-to-many CRM opportunity-line-item joins?
  2. How do you enforce multi-tenant row-level security and prevent unbounded BigQuery/Snowflake scan bills in an autonomous SQL agent?
  3. When should the agent ask a clarification question instead of guessing a SQL filter?
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔

Bidirectional Taxonomy Links

[HubB] Role Lens · AI Data & Knowledge Pipeline Engineer[HubB] Role Lens · Applied AI & Agent Systems Engineer[L0 Card] Hybrid Search (BM25 + Dense) & RRF[L0 Card] ReAct, Plan-Execute & Reflexion[L0 Card] Citation Grounding & Faithfulness[L0] Qdrant Dense + SPLADE Hybrid Search & ACL Pre-Filtered HNSW Primitive[L0] LangGraph Stateful Graph, Checkpointer Persistence & HITL Interrupt Primitive[L0] Agent Trajectory, Tool-Call & Side-Effect Failure Taxonomy Primitive[L1] Stage 2 · Semantic-Layer Grounded Text-to-SQL & Read-Only Sandbox Repair Pattern[L1] Stage 3 · Structured Output Constrained FSM Decoding, Reasoning Protection & Retry Mode[L1] Stage 4 · Progressive Intent Disambiguation Chips UX Pattern[L1] Stage 5 · Golden-Dataset CI/CD Regression Gate & Trajectory LLMOps Pattern[L2] L2 Scenario · B2B RevOps Deal Intelligence & Pipeline Forecasting Copilot

Internal Tools & Primary Sources