liveBook · Manning

Text-to-SQL

Also called SQL generation

Text-to-SQL is the task of translating natural-language questions or requests into SQL queries for a database.

How 3 Manning books explain it

Data Analysis with LLMs

Text-to-SQL translation is the task of translating questions expressed in natural language into SQL queries.

How it is used
Turns natural-language questions about tabular data into SQL queries for a database to execute.
How deep it goes
Works through prompt construction and manual query testing, while deferring automatic execution and support for changing database schemas.
Examples
Uses survey results, product reviews, and game-sales questions, including a generated query that counts rows in a games table.
What you can do after
Build it from scratch as a Python prompt-based translator, then run and inspect its generated queries using SQLite.

Read how Data Analysis with LLMs explains text-to-SQL →

Vibe Engineering

Text-to-SQL is the task of translating natural-language requests into executable SQL queries against a database.

How it is used
Uses text-to-SQL as an LLM-backed service for turning user requests into database queries.
How deep it goes
Develops service and prompt implementation alongside a benchmark-based accuracy verification framework.
Examples
Uses an employee-count request, table definitions, recent queries, and the BIRD dataset to illustrate generation and evaluation.
What you can do after
Evaluate and understand a text-to-SQL service using benchmark data and explicit context, cost, and provider tradeoffs.

Read how Vibe Engineering explains text-to-SQL →

AI Agents and Applications

Text-to-SQL is a technique that converts natural-language questions into executable SQL queries.

How it is used
Enables natural-language access to structured facts stored in relational databases.
How deep it goes
Explains schema-aware prompting and execution, but stops short of database-specific implementation details.
Examples
Uses a state table with CREATE TABLE metadata, sample rows, and questions such as unit sales or resort information.
What you can do after
Apply via an LLM application to generate and execute SQL against structured relational data.

Read how AI Agents and Applications explains text-to-SQL →

Also covered in

What to know first

Related concepts

Questions about text-to-SQL

What is text-to-SQL?

Text-to-SQL is the task of translating natural-language questions or requests into SQL queries for a database.

Which Manning books explain text-to-SQL?

Data Analysis with LLMs, Vibe Engineering and AI Agents and Applications.

What should I know before learning text-to-SQL?

Manning books that teach text-to-SQL usually introduce language model, SQL, Cypher and query result first.

What is text-to-SQL also called?

Text-to-SQL is also called SQL generation.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.