Skip to content

Fine-tuning

Adrià Castany 2 min

What is fine-tuning?

Fine-tuning is the process of continuing to train an already trained language model on your own examples, so that it adopts a style, a format or a specific task. It changes the model from the inside. It does not give it access to current information, which is what document retrieval does.

Also called

fine tuning, model fine-tuning, custom model training

Topic
AI in support
On this page
  1. Fine-tuning and RAG
  2. Why it matters
  3. Fine-tuning versus RAG
  4. When fine-tuning makes sense
  5. When it does not
  6. The questions about data
  7. How Intake handles it
  8. Frequently asked questions

Fine-tuning and RAG

Fine-tuning teaches the model how to answer.

RAG hands it, on every question, the content to answer with. If the documentation changes, with RAG you update the document, and with fine-tuning you would have to train again. For a customer service agent to know the product, RAG is what gets used.

Why it matters

Many people assume that putting AI into support means training it on the company’s data.

It almost never does, and believing so delays projects and raises legal doubts that do not apply. Knowing what fine-tuning solves and what it does not lets you ask a vendor the right question. Where the agent looks for the answer and whether conversations are used to train anything.

Fine-tuning versus RAG

They are two ways of adapting a model, and they solve different problems.

Fine-tuningRAG
What changesThe model itselfWhat the model reads when answering
Good forStyle, format and repeated tasksKnowledge that changes
When content changesTrain againUpdate the document
Cites the sourceNoYes, the passage used
Data neededMany well-chosen examplesThe existing documentation

When fine-tuning makes sense

Fine-tuning pays off in three cases.

  • A narrow, repeated task, such as classifying conversations by topic.
  • A very strict output format the model does not respect from instructions.
  • Very high volume, where a small tuned model works out cheaper.

When it does not

It is no use for making the model know prices, policies or the state of an account.

That information changes and has to be looked up at the time. It does not prevent hallucinations either. A tuned model answers in the company’s tone even when it makes the fact up.

The questions about data

Before fine-tuning you need to know which conversations are used as examples, whether they contain personal data and who keeps the resulting model.

With RAG those questions are simpler, because the model is not modified.

How Intake handles it

Frequently asked questions

What is fine-tuning?

Further training of a language model. You start from an already trained model and train it a little more on your own examples so that it does a specific task better.

Which is better, fine-tuning or RAG?

It depends on the problem. For the model to know information that changes, RAG. To fix a style or a heavily repeated task, fine-tuning. In customer service the usual choice is RAG with good instructions.

Do you need to train a model to have an AI agent in support?

No. A customer service AI agent usually runs on a general model, the company’s instructions and its documentation, which it consults on every answer.

Does fine-tuning eliminate hallucinations?

No. It reduces them on the task it was tuned for, but the model can still invent a fact it does not have. Giving it the source at answer time is what addresses that.

Glossary

Keep reading

Glossary

Related terms

See the full glossary

Add it without dropping what you use

15 minutes, no commitment