AI Builders: Building a text-to-SQL agent
Skills:
LLM Engineering80%
Key Takeaways
Builds a text-to-SQL agent using LLM-powered SQL generation workflow and Marimo notebook
Original Description
Writing SQL has long been one of the biggest barriers standing between business users and the data they need. In this episode of AI Builders, we build a text-to-SQL analytics agent inside a Marimo notebook using DuckDB, Plotly, and an LLM-powered SQL generation workflow, then layer in observability and tracing and discuss what it takes to evolve the prototype into a production-ready reporting application. If you're a developer interested in building practical AI-powered analytics and reporting applications, this video is for you.
Use the blog post and GitHub repo below to follow along and start experimenting.
💻 GitHub repo: https://github.com/rratshin-wandb/ai-builders
📘 Blog post: https://wandb.ai/wandb_fc/ai-builders/reports/Building-a-text-to-SQL-agent--VmlldzoxNzAyMDIwNQ
NOTE from Russ: Second episode of the AI Builders series of YouTube videos "for developers who love to build and are having a great time bringing the wonders of AI into our applications." While this video does include mention of Weights & Biases products, the intro sequence should not be branded. Video will be linked to from a W&B blog post and GitHub repo. Thank you!
⏳Timestamps:
0:00 — Introduction and motivation for a text-to-SQL agent
1:39 — Diving into the agent notebook
2:08 — Overview of the project star schema and data model
2:23 — System prompt design and JSON output format
2:58 — Agent class design and function walkthrough
3:56 — Building Plotly charts from LLM-returned chart config
4:32 — Invoking the agent and inspecting results in Marimo
5:36 — Tracing and observability
6:28 — Monitoring and the path to production
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: LLM Engineering
View skill →Related Reads
📰
📰
📰
📰
Por qué el "precio de lista" de una tienda no vale nada (y cómo construimos un tracker honesto)
Dev.to · Edu Tor
FDA Recall API: A Working Guide to openFDA Enforcement
Dev.to · Mayd-It
Common Mistakes New Data Engineers Make (And How to Avoid Them)
Dev.to · Abhishek Konagalla
DuckDB vs PostgreSQL: I Ran the Same Query on Both. One Finished in 12ms. The Other Timed Out.
Medium · Programming
Chapters (9)
Introduction and motivation for a text-to-SQL agent
1:39
Diving into the agent notebook
2:08
Overview of the project star schema and data model
2:23
System prompt design and JSON output format
2:58
Agent class design and function walkthrough
3:56
Building Plotly charts from LLM-returned chart config
4:32
Invoking the agent and inspecting results in Marimo
5:36
Tracing and observability
6:28
Monitoring and the path to production
🎓
Tutor Explanation
DeepCamp AI