Fine tuning issue with GPT3.5turbo

I want to create a custom chatbot that answers question on the corpus I have fine trained on. I hae gone thru most of the documentation pertaining to FT and have followed all the steps. After FT, the model would not answer my question based on the corpus provided. Even straight questions for which answers were present in the training corpus was completely missed.

My data has 44 pairs of ‘Question’ and ‘Answer’. I have used a batch size of 8 and 15 epochs as recommended by chatGPT. Any pointers on how I can do the FT and ensure that the model responds based on my training corpus only?

Hi there!

Fine-tuning is not the right/best choice when it comes to Q&A type of capabilities. Hence what you are seeing is the “expected behaviour”. Fine-tuning, as discussed here in the OpenAI documentation, is mostly intended to tailor the way how the model returns (e.g. in terms of the language, style) a certain output or approaches a specific task. During the fine-tuning process knowledge is not explicitly retained.

You should look into embeddings-based RAG solutions to achieve your goal. Here are a couple of links from the OpenAI documentation and the OpenAI cookbook that should get you started.

1. Overview of embedding use cases including Q&A tasks

2. Example procedure for implementation embeddings-based Q&A

The other option you have at your disposal is the OpenAI’s Assistants API, which allows you to upload a proprietary knowledge base or in your case Q&A pairs through the file search capability. It’s a convenient solution if you want to avoid creating and storing embeddings yourself. Assistants can be used with gpt-3.5-turbo.

Thank you so much for your response. I was wondering why after numerous tries the FT model failed in impressing me…which one (RAG vs Assistants API) will you choose? I am creating a chatbot to answer questions (in a conversational mode) from a list of Q&A. Thank you

1 Like

I think the choice of a bespoke RAG solution vs. an Assistants API depends on your needs. There are certain limitations associated with the use of Assistants in terms of how much you can control the RAG process. At the same time, Assistants do much of the heavy lifting for you when it comes to chunking etc. I recommend you take a closer looks at the links provided, perhaps give each a try based on a small data set (for Assistants you can use the Assistant Playground for initial testing).

Good luck with your project!