---
title: "Discussion on \"Fine-Tuning GPT-3 for Natural Language to SQL Conversion: An In-Depth Guide\" | Hashnode"
description: "Discussion on \"Fine-Tuning GPT-3 for Natural Language to SQL Conversion: An In-Depth Guide\". Automate your Natural Language to SQL conversion process with GPT-3!  a step-by-step walkthrough on how to fine-tune GPT-3 for your custom use case."
url: "https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Fine-Tuning GPT-3 for Natural Language to SQL Conversion: An In-Depth Guide](https://blog.futuresmart.ai/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide?utm_source=hashnode&utm_medium=feed)

Automate your Natural Language to SQL conversion process with GPT-3! a step-by-step walkthrough on how to fine-tune GPT-3 for your custom use case.

Mar 1, 2023 · 7 min read · blog.futuresmart.ai  
Read the article

-   [#gpt-3](https://hashnode.com/tag/gpt-3)
-   [#sql](https://hashnode.com/tag/sql)
-   [#nlp](https://hashnode.com/tag/nlp)
-   [#fine-tune](https://hashnode.com/tag/fine-tune)
-   [#nl2sql](https://hashnode.com/tag/nl2sql)

## Written by

[Rupesh Gelal](https://hashnode.com/@rgrupesh)

@rgrupesh · Kathmandu, Nepal

  
[View profile](https://hashnode.com/@rgrupesh)

NLP

I am passionate about new technologies and have a strong focus and experience in the areas of Machine Learning and Deep Learning, particularly in Natural Language Processing.

## Responses 5

Markdown supported · ⌘↵ to post

[Adil Majeed](https://hashnode.com/@adild2k)

[Dec 26, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/658a6fe876c8e7cda13ffe98)

Its really good, it would be great if the author can share the training file that he has used to train the model.

[Trent Ding](https://hashnode.com/@TrentD)

[Aug 2, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/64ca2ae0fc5843b339eb9356)

Thanks for this help article. I want to know how big is the dataset, and how many tables it can cover after fine tuning.

[Majda](https://hashnode.com/@Majda)

[Jun 19, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/648fe99f588d27135a06e91b)

Thanks for this helpful article about fine-tuning GPT-3 for natural language to SQL conversion. For those who are interested in using ChatGPT, I recommend reading this article ([blog.devart.com/how-to-use-chatgpt-to-write-sql-j…](https://blog.devart.com/how-to-use-chatgpt-to-write-sql-join-queries.html)) about how to use ChatGPT to write SQL JOIN queries

[Naveen Saharan](https://hashnode.com/@Naveensaharan)

[Jun 7, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/6480b9dfdc966543c1f9e10a)

What would u suggest - fine tuning on custom data set vs using vectordb for passing required metadata abt the tables

Its very difficult to fine tune 1000’s of table across multiple database etc…

We noticed Hallucination of llm cannot be reduced using fine tuning

Do u have code for transfer learning on text to sql for gpt3 - so that it does its best in sql generation

[Meet Vora](https://hashnode.com/@Meet0902)

[Apr 27, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/644a49155c7f2d85a97f1700)

Hello sir, I am intrigued by your article. I have got much more understanding, however I wanted to understand that is task specific to a particular schema?

I see that you are not passing the fields in the prompt, so how is it picking up about which field to use

[Meet Vora](https://hashnode.com/@Meet0902)

[Apr 29, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/644a49155c7f2d85a97f1700#reply-644d6538bfb233b3b6e2b049)

[Rupesh Gelal](https://hashnode.com/@rgrupesh) thank you so much for your reply.

Yes your second answer is in inline with my query. Also is it possible to create a universal text to sql query, such that user just has to define schema

[Rupesh Gelal](https://hashnode.com/@rgrupesh)

[May 4, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/644a49155c7f2d85a97f1700#reply-64536ea5e91190f813ae34e3)

[Meet Vora](https://hashnode.com/@Meet0902) Yes, those systems are called Natural Language Interface to Databases (NLIDB). You can look them online

[Priyabrata Das](https://hashnode.com/@priyabrata12)

[Jul 3, 2023](https://hashnode.com/posts/fine-tuning-gpt-3-for-natural-language-to-sql-conversion-an-in-depth-guide/63fef3fd2c70093fee20d860/comment/644a49155c7f2d85a97f1700#reply-64a2bd1afda312e2adb06211)

can you plz provide me this csv file ?[Rupesh Gelal](https://hashnode.com/@rgrupesh)
