Glossary
What is text-to-SQL?
Last updated
Definition
Text-to-SQL is the technique of turning a question written in plain language into a SQL query that a database can run, usually with a large language model doing the translation.
How it works
The model receives your question and a description of the data, such as view and column names, then writes a query. A system runs it and returns the rows.
Where it goes wrong
- Ambiguous names, such as three columns that could be "revenue".
- Missing business rules, such as which orders count.
- Too much schema, which makes the model guess.
How to make it dependable
Point it at curated views, keep the connection read-only and verify the numbers in the answer. A semantic layer helps in the same way. Book a demo to see how exelens approaches it.
Frequently asked questions
- Is text-to-SQL accurate?
- It depends mostly on the data it sees. On clearly named, curated views it is far more reliable than on hundreds of raw tables with cryptic columns.
- Is it safe to let an AI query my warehouse?
- It can be, if access is read-only, limited to chosen views and every statement runs under a timeout. Check the answer against the data before you rely on it.
See Text-to-SQL in practice
A short walkthrough with the founder: connect read-only, ask a real question, pin the answer.