Problem
Employees at food-delivery, retail and classifieds companies need answers from data but depend on a few scarce analysts. Text-to-SQL looks solved on benchmarks, yet out-of-the-box LLMs on company databases with more than two tables started below 25% accuracy. Even 95% is not enough for business users, and the last slice depends on context more than on the model. A second failure is an LLM that is too helpful and answers with something nearby instead of saying it cannot.
Example from the article: a user asked for the address of user X. The LLM had no address data, inferred that the driver's coordinates during delivery are close to it, and returned them. The right answer was "Sorry, I do not have access to addresses."
Solution in brief
Prosus built the Toqan Data Analyst, a Slack chatbot where an agent writes SQL. Two tools, clarifying questions and stated assumptions, curb over-helpfulness. Hidden context comes from always-on business rules, a glossary matched against the request, and a table and column selection step.
Questions this case answers
- How to make an LLM answer business questions over a multi-table database accurately when the schema is poorly documented and the questions use implicit team jargon
- How to make a data agent refuse or state its assumptions instead of inventing an answer from loosely related data
- How to regression-test a non-deterministic question-answering agent when the correct answer changes as the data changes
- How to make a text-to-SQL assistant answer business questions accurately on messy company data?
Tools and methods
- Text-to-SQL agent — plans steps, writes SQL and runs it on the database
- Clarifying-question and assumptions tools — resolve ambiguity and expose the definitions the agent used
- Business rules, glossary, table selection — deliver hidden context to the agent
- Prompted model as judge — compares agent answers with ground truth in tests
- Slack — the chat interface
Google or a one-time email code. No password.
