An agent writing SQL does two jobs in one pass: it reads your schema and it writes a statement. When the output is wrong, most reviewers attack the second job, rewriting the prompt, adding examples, or asking for a retry. The evidence points the other way. A survey of LLM-based text-to-SQL systems names schema understanding as a core difficulty: real schemas are large and vary by domain, and mapping a plain question onto the right tables and columns is where systems break the text-to-SQL review. Research on schema linking goes further, reporting that schema information plays a significant or even dominant role in text-to-SQL quality, and that feeding a whole database schema raises token cost and increases hallucination and error rates X-SQL on schema linking.
The practical consequence is that a query can be perfectly valid SQL and still answer the wrong question. A practitioner guide to text-to-SQL accuracy separates failures into structural errors (syntax, wrong join type, missing GROUP BY) and semantic errors (valid SQL that answers the wrong question, such as filtering on order_date instead of ship_date). It calls semantic errors the silent killers, because the database engine never complains text-to-SQL accuracy practices. A wrong schema read produces exactly this class of error: the agent picks order_adjustments when the question said refunds, or ship_region when the business means customer_region, and the query runs clean and returns a confident wrong number.
There is a second reason to start one step earlier. Once an agent has committed to a table choice inside a generated query, that choice is buried in a join clause and looks deliberate. Reviewers tend to check whether the SQL is well formed and whether the number seems plausible, not whether the agent understood the column. Pulling the schema read out into a separate, reviewable step makes the assumption visible while it is still cheap to correct.



