by hyuuu · 2y ago · 0 comments
the llm hallucinates as to what "yesterday" means, there are other instances as well where the generated SQL is valid syntax-wise but not in intent. This is especially dangerous for aggregation queries such as MAX, COUNT, etc because it will spit out a number but is it the right number? and the only way to check is to read the SQL itself and verify, which defeats the whole purpose of it.
- phantom tables and columns, in which case the query will fail
- incorrect syntax for date functions (i.e. the wrong flavor of SQL)
And we tend to see less of this type of hallucination when there are lots of example SQL queries that have been "trained" into the RAG system.