Comparing RAG with model fine-tuning
LLMs can be adapted to your data in two ways:
- Fine-tuning: With fine-tuning, you are adjusting the weights and/or biases that define the model’s intelligence based on new training data. This directly impacts the model, permanently changing how it will interact with new inputs.
- Input/prompts: This is where you use the model, using the prompt/input to introduce new knowledge that the LLM can act upon.
Why not use fine-tuning in all situations? Once you have introduced the new knowledge, the LLM will always have it! It is also how the model was created – by being trained with data, right? That sounds right in theory, but in practice, fine-tuning has been more reliable in teaching a model specialized tasks (such as teaching a model how to converse in a certain way), and less reliable for factual recall.
The reason is complicated, but in general, a model’s knowledge of facts is like a human’s long-term...