One rule decides whether it works: look at the schema before you write the query.
Same question. One agent guessed, one looked first.
-- the model invented plausible names SELECT g.name, AVG(s.length) FROM songs s JOIN genres g ON s.genre_id = g.id GROUP BY g.name; OperationalError: no such table: songs
-- real Chinook names and columns SELECT g.Name, AVG(t.Milliseconds) FROM Track t JOIN Genre g ON t.GenreId = g.GenreId GROUP BY g.Name ORDER BY 2 DESC LIMIT 5; Sci Fi & Fantasy | 2911783.0
Hover a table to see which questions need it.
Both answer the question. Only one answers it the same way every time.
-- waiting for generate_query…
Never trust a natural-language answer you haven't checked against golden SQL.
sales_*. It never learns payroll exists.interrupt() before runStateGraph when create_react_agent already answers the question?