AP20 · Unsupervised text-to-SQL
Family: Tools and agent-computer interface
Moderate evidence
Original names: unsupervised text-to-SQL, naive text-to-SQL
The model turns the question into SQL run straight against the database, with no business definitions and no review.
Definition
An agent is left to translate questions into SQL run directly against the database, with no semantic layer and no review of the queries.
Observable symptoms
- Business figures change depending on how the question is phrased.
- The generated queries stay invisible to the user.
- The agent has write access to the database.
Why it hurts
Business rules (revenue recognition, for instance) live outside the schema; the model makes up joins and definitions, at the risk of wrong data or unintended changes.
Figures
- Thoughtworks put text-to-SQL in the “Hold” ring (avoid) of its November 2025 radar and calls for human review of every generated query; the April 2026 radar confirms that naive translation often produces wrong results.
Remedies from the catalogue
- A2 · Tools and agent-computer interface (ACI) — A governed semantic layer (Cube or dbt, for instance), exposed as a tool: the agent picks metrics that are already defined instead of writing joins.
- F1 · Human in the loop — Generated queries are shown and reviewed before their figures are used.
- G6 · Rule of Two — A read-only connection: the agent that handles free-form questions does not also get the right to write to the database.
Misused patterns
Related anti-patterns
Sources
- Technology Radar, vol. 33 — Thoughtworks, 2025-11
- Technology Radar, vol. 34 — Thoughtworks, 2026-04
Content reviewed on 2026-10-05