Fine tuned model is hallucinating

Dear all,

Junior AI tamer here.

I hope someone can help mi with this. I started to fine tune a model based on the API documentations, and I was really happy as the fine-tuning process works as intended.

I used only a short .jsonl, with 4 lines only. Issues:

  • In the playground if I ask a specific prompt, which is in the training data the fine-tuned model answers properly but it also hallucinates other 5-6 lines of text, which I was not giving in. Why is this?
  • Should I add more training data? In the docs there was at least a 100 line long jsonl. Below thin number I can not expect proper behaviour?
  • Can I limit the token umber somehow related to the answer? Maybe if I limit the token no. it will answer only whats needed, and skip the hallucinations.

My other questions if I may.

  • How can you give the fine-tuned model “personality” like you do in Chat GPT when you say “Act like …”
  • Which models are the best in price / effectiveness ratio?
  • Can you fine tune a gpt-3.5?

Thanks!

2 Likes

Welcome to the forum!

Fine tuning teaches the model new ways to think, new patterns to see and use, it is a very poor way to teach it new data.

You can use embeddings to encode your data and then run a retrieval on that data and use that as context for a query to a higher order model like GPT-3.5 or 4.

1 Like

Can you explain the last sentence with a bit more depth? I’m not sure how to “use embeddings to to encode your data and then run a retrieval”. Can you give me the API endpoints for this process please?

You can find the embeddings documentation here OpenAI Platform

1 Like