← All drillsBuild a Text-to-SQL Agent
What you'll be able to do- ✓Write a test set whose answers are SQL, and grade an agent by comparing the rows its SQL returns
- ✓Run model-written SQL safely, with a read-only connection and a check on the SQL text
- ✓Build a baseline text-to-SQL agent with the schema taken from the database, and read its failures
- ✓Teach an agent your company's vocabulary with retrieved solved examples (ChromaDB, local embeddings) and with written rules, and compare the two
- ✓Add a repair loop that sends database errors back to the model, and measure what it can and cannot fix
Turn business questions into SQL automatically, and measure how often the answer is right — the engine behind "ask your data" analytics copilots.
⌁ Powers Snowflake Cortex Analyst, Databricks Genie, BigQuery (Gemini), and Vanna.AI.
Start this internshipCreate an account to unlock the 5 sections, the workbench, and askThili.
BeginSections
1. Build a Text-to-SQL Agent
🔒 locked2. The database and the test set
🔒 locked3. A baseline agent, measured
🔒 locked4. Teach it your company: retrieval and rules
🔒 locked5. When the SQL does not run: a repair loop
🔒 lockedDig deeper
📄Spider: A Large-Scale Dataset for Text-to-SQL (Yu et al., 2018)
paper📄Retrieval-Augmented Generation for Knowledge-Intensive NLP (Lewis et al., 2020)
paper🔗Groq documentation (the API used in this drill)
docs🔗Chroma documentation (the vector store used in lesson 3)
docsPart of these learning paths
I'm a student and I want to get my first AI/ML job
View path →I want to build my first AI agent
View path →I want to build an app that answers from my own documents
View path →