Converting Natural language to SQL query - Which model is best GPT-3.5 or GPT-4

Which model is best to convert natural language in to sql query .

GPT-3.5 or GPT-4?

Currently I am using gpt-3.5 and I am facing some issues in creating complex.
Structure of the schema is in JSON format.

GPT-4 would be better hands down at converting NLP into SQL queries, though the performance will also depend a lot on how the prompt is setup and what all information is being provided to the LLM


No question. I tried generating SQL with gpt-3.5 and it was constant failure.

1 Like

GPT-4 in general is better at any sort of code generation, whether it be SQL or Python or js.

1 Like