SQLTableRetrieverQueryEngine not generating the correct SQL #11480
Replies: 1 comment
-
🤖 Hey @Grkrish2002, back for another round of SQL fun, I see! Great to have you back. 🎉 Based on the information you've provided, it seems like you want the The To achieve the desired functionality, you would need to adjust this logic to recognize patterns like "name like " and translate them into the corresponding SQL
Without the specific implementation details of the natural language to SQL translation process, it's not possible to provide exact code modifications. If the translation logic uses predefined templates or patterns, you would need to add or modify a template to capture and translate "like" phrases into SQL Please note that this is a high-level approach and the actual implementation might vary based on the specific details of the For more details, you can refer to the source code of the I hope this helps! If you have any more questions or need further clarification, feel free to ask. Sources
|
Beta Was this translation helpful? Give feedback.
-
I am using LLamaindex SQLTableRetrieverQueryEngine for natural language to SQL interface. My schema has one of the table called 'Suppliers' which has the columns 'Name' and 'ContactInfo'. One of the row values are 'FitLife Sports Gear' for Name, 'contact@fitlifesports.com' for ContactInfo.
On submitting the prompt query 'contact info of supplier name like FitLife Sports', it is generating the below SQL
SELECT ContactInfo FROM Suppliers WHERE Name = 'FitLife Sports';
Since my query has 'supplier name like..', it should not generate the SQL with exact string match in the where clause. How should I fix this ?
Beta Was this translation helpful? Give feedback.
All reactions