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
📰
📰
📰
📰
Half of Data Engineering Jobs on LinkedIn Aren't Real
Dev.to · DataDriven
Evolutionary Data Through Schemaboi: Achieving Forward, Backwards, and Sideways Compatibility
InfoQ AI/ML
How Morphohack Helped Me Recover €678,000 in Lost Crypto Assets
Medium · Data Science
10 awk and sed Techniques Every Data Analyst Should Know for Data Cleaning and Transformation
Medium · Data Science
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