Method for improving automatic generation accuracy of SQL code
By combining semantic modeling and user intention recognition, and using big models to generate pseudo-SQL and replace it, the accuracy of SQL code automatic generation in the prior art is solved, and the accuracy of generating SQL is significantly improved.
Patent Information
- Application Number
- CN202411768943.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-25
AI Technical Summary
The existing SQL code automatic generation technology has problems with user intention to understand limitations, accuracy issues, and inability to understand professional terms, resulting in inaccurate SQL code generated.
By combining semantic models for semantic modeling, the construction prompt words are handed over to the big model for processing, user intention recognition is performed, and pseudo-SQL is generated using the semantic understanding and text generation ability of the big model. Finally, the index information and dimension information are replaced through the Python program to generate the final SQL statement.
The accuracy of SQL automatic generation has been greatly improved. By semantic modeling and user intent recognition of the database in advance, the large model can better understand the database structure information and the intention of user questions.