Sign In

Observing FineTuning and RAG being used interchangeably

Haebom
Recently, I've noticed that two terms are often used interchangeably when reading posts on Facebook or LinkedIn. As their names suggest, they're clearly different methods. Both are used to improve model performance and adjust models for specific tasks or contexts. That's probably why they're sometimes mixed up. Here are the differences between the two.

Fine-tuning

Rather than adding new information to an existing model, the goal is to modify the model’s behavior.
Typical cases for fine-tuning include ensuring the model gives a certain response, or producing complex outputs that require a sequence of prompts.
Fine-tuning can also help reduce the number of tokens needed or shorten request latency in many scenarios.

Retrieval-augmented Generation (RAG)

If you want to add new knowledge to your model, you should use RAG.
RAG doesn’t directly add new knowledge, but supplies relevant information to the prompt in the request. The model then uses this to answer your question.
In experiments with real datasets comparing a fine-tuned model and a base model combined with RAG, the fine-tuned model had 0% accuracy, while the model with RAG reached 95%. This clearly demonstrates that fine-tuning does not add new knowledge to the model.

Differences:

Purpose and operation: Fine-tuning focuses on adapting or specializing how the base model behaves, while RAG draws on external data sources to enrich the model’s output.
Knowledge integration: While RAG seems to add new knowledge to the model, it actually uses search results rather than changing the model directly. Fine-tuning, on the other hand, alters the model itself.
These two approaches are often confused because both are used to improve model outputs and may give similar results in certain cases. However, their core goals and how they work are quite different. RAG generates responses using external resources, while fine-tuning tweaks the model’s built-in knowledge and learning process.

Recommended reading

Subscribe to 'haebom'
📚 Welcome to Haebom's archives.
---
I post articles related to IT 💻, economy 💰, and humanities 🎭.
If you are curious about my thoughts, perspectives or interests, please subscribe.
haebom@kakao.com
Subscribe