← Back to all projects

NL2SQL Reporting Agent

AI product · Internal project at an education company, anonymized

Product

The original reporting interface of the school-affairs SaaS was so complex that staff needed a long time to learn the click paths. The reporting agent I designed replaces that with natural language — just say “average math score last term” and get a chart in seconds. This is not another SQL tool; it's a new interaction paradigm, from “learning the interface” to “just talking.”

Engineering

FastAPI backend + DeepSeek-V3 for intent recognition + a rule engine for Cube routing, avoiding the safety risks of letting an LLM write raw SQL. Four iterations: v1 keyword matching → v2 predefined views → v3 schema RAG → v4 Cube queries with row-level security injection.

FastAPI DeepSeek-V3 Rule engine Schema RAG Cube RLS