After researching this for a month+, we could not find any solution.
All of the models produce the same 4-5 SQL errors when trying to convert NLP to SQL query.
We tried both the text-davinci-003, and the Turbo 3.5, both makes the same BEGINNERS errors:
- “window functions are not allowed in where” SQL error
- “must appear in the GROUP BY clause” SQL error
- “more than one row returned by a subquery used as an expression” SQL error
The intention of the produced sql is correct, but it always make these errors.
No matter how to try to tell it to stop doing these, it will insist doing them, like someone trained it only on errors.
On the website however, not only it won’t make them, it also knows how to fix them.
Is there ANYTHING we can do to :
- Make it listen to us and not do this
- Use any other automated library to fix them ? (tried, it is too complex to identify)
- Any other model that won’t do this? (why the website does not ? )