AI engineering case study
Voice-to-SQL Analytics Copilot
Core stack
LangGraph · Snowflake · Voice AI · SQL Gen
Delivery approach
Situation
Business teams depended on analysts for routine questions because the Snowflake data required SQL and knowledge of warehouse schemas. Spoken requests made business terms, date ranges, and metric definitions more ambiguous. A direct speech-to-SQL flow could choose the wrong join, scan too much data, or expose rows outside the user's role.
Task
Build a voice-first analytics workflow for eight business teams and more than 200 daily users. It needed to clarify ambiguous requests, apply shared metric definitions, preserve Snowflake access controls, and show the interpretation and query behind each answer.
Action
Speech is first converted into a structured intent with a metric, dimensions, filters, and time range. LangGraph checks those fields against the business glossary and semantic layer. If a term maps to more than one definition, it asks a short follow-up before generating SQL from approved tables and relationships. The execution gate permits read-only statements and applies role-scoped credentials, row limits, timeouts, and cost checks. Unknown columns and unbounded scans are rejected before execution. The response includes the interpreted question, metric definition, filters, and generated query so users can inspect it. A labeled question set tests transcription noise, joins, date logic, aggregation, access boundaries, and answer consistency. The operating dashboard tracks failed queries, clarification rates, warehouse cost, latency, and user corrections.
Result
More than 200 daily users across eight teams can ask a spoken question without waiting for an analyst to write SQL. Clarification catches ambiguous terms before execution, while visible definitions and queries give analysts a review path. New use cases are added through the controlled semantic layer rather than direct, unrestricted warehouse access.
Technology stack
- LangGraph
- Snowflake
- Voice AI
- SQL Gen