How to Get Consistent SQL Queries from GPT-40 for the Same Input?

Thank you very much for your feedback @merefield and @platypus
Currently, this project is being developed solely for internal use and will be accessed by a select few. I completely agree that incorrect SQL queries could negatively impact performance. For now, from a security perspective, I’ve ensured that only SELECT statements are generated.

As for caching, yes, we can implement our own caching mechanism, focusing on storing the user queries and the corresponding SQL statements, not the results. However, this is something we plan to explore later, as right now, we are primarily testing the concept’s viability.

I also think we’ll need to move towards function calling, but we’ll do so after analyzing the types of questions our users are asking. This will guide us in deciding which functions to implement.

Thank you again for all your guidance.

2 Likes