defog-ai / sqlcoder

SoTA LLM for converting natural language questions to SQL queries
Apache License 2.0
3.44k stars 219 forks source link

How to enforce model to output SQL code only? #41

Closed Septimmius closed 1 year ago

Septimmius commented 1 year ago

Hello, I noticed that the model spent the majority of time doing code explanation and only output the SQL query at the end. Is it possible to tell model to directly generate sql query so users don't need to spend time waiting for the actual code. Thanks!

rishsriv commented 1 year ago

Hi there, are you using the prompt in prompt.md? If you are and if you're using sqlcoder2, it should only output the SQL and not the explanation.