When I tried to convert the natural language to SQL query using LLM , The model does not use the distinct keyword while creating query.How to overcome this?
Example:
If I ask how many customers logged-in today? It should use the Distinct keyword to take unique customers.
Have you mentioned in the prompt to return only distinct values in the output ?
Or if you’re using a sample, ensure all your samples have DISTINCT in them and then queries only return distinct values
2 Likes