openai-apichatgpt-apigpt-4

OpenAI Chat Completions API: How do I customize answers from GPT-3.5 or GPT-4 models if I can't fine-tune them?


We have seen some companies use GPT-3.5 or GPT-4 models to train their own data and provide customized answers. But GPT-3.5 and GPT-4 models are not available for fine-tuning.

I've seen the document from OpenAI about this issue, but I had seen OpenAI only allow fine-tuning davinci, for example.

How do I customize answers from a GPT-3.5 or GPT-4 model if I can't fine-tune them?


Solution

  • They don't fine-tune the GPT-3.5 or GPT-4 models.

    You have two options.


    OPTION 1: Using LlamaIndex or LangChain

    What they do is use LlamaIndex (formerly GPT-Index) or LangChain. Both of them enable you to connect OpenAI models with your existing data sources.


    OPTION 2: Using the OpenAI Embeddings API endpoint

    See my past answer. Also, as @peter_the_oak mentioned, you can use Pinecone to store embedding vectors. Pinecone is designed specifically for handling this type of data.