Text to sql using fine tuned model

Hi There, We want to generate queries based on the user input (in natural langauge) using custom fine tuned models, any suggestions would be of great help.

Thanks in Advance

The fine-tuning docs are pretty good.

There’s a few YouTube videos on the process too.

Do you have any specific questions? What’s your experience level with programming?

Thanks for your reply.

I understand that we can build the fine tuned model for text based output, however our ask is to build the model which will return the SQL Code.
Is there a possibility to build custom (fine tuned) model to generate SQL query instead of using Pre Trained models? If so what should be the structure of the dataset, as I understand we have only Prompt and Conclusion.
FYI : I am well versed with programming specifically using Python.


I mean, text is text, so whether it’s outputting SQL or normal text, it should be fine.

Have you done any tests on the playground with a base model?

I would probably put the “textual descriptions of the function” in the prompt and the resulting SQL in the completion.