Glossary

Text to SQL

Text to SQL is the task of turning a plain-language question into a SQL query. You type “how many orders did we get last week” and it gives you the SQL that answers it.

It is a useful building block. It is also where a lot of AI data tools stop, which is why they feel impressive in a demo and shaky in real use. Text to SQL produces one query and hands it over. It does not run the query, read the result, or notice when the answer is wrong.

How it differs from agentic analytics

An agentic analytics system uses text to SQL as one step inside a loop. After generating the query, the agent runs it, checks the output, and rewrites the query if the result looks off. So text to SQL answers “what SQL might this be”, while an agent answers “what is the correct number, checked”.

What makes it reliable

Raw text to SQL gets better when it has context to lean on. A semantic layer gives it the real metric definitions, and the broader work of context engineering gives it the schema, rules, and docs it needs. Without that context, text to SQL is guessing at what your words mean.