27 ms·
im curious to know how you get around the hallucinations? for example, for the query: "give me <products / sales / rows> that were created yesterday" the llm h
by hyuuu 3y ago
im curious to know how you get around the hallucinations? for example, for the query: "give me <products / sales / rows> that were created yesterday"
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.
- zainhoda 3y agoThat's a fair concern. In actual usage, however, the vast majority of hallucination (>90%) tends to be: - 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.