Fine-tuning continues training a pretrained model on examples for a specific task. Use it when you have a repeatable behavior and evaluate on held-out data; frequently changing facts may belong in retrieval instead.
Fine-tuning continues training a pretrained model on a smaller dataset aimed at a task or domain. The model starts with learned weights instead of random ones, then adjusts them using examples of the behavior you want.
This can help when a task repeats often and the output needs a stable style, structure, or decision pattern. It is not the same as training a model from scratch, and it does not guarantee better answers.
A fine-tuning dataset should show useful inputs and the outputs you want. Before training, write down what should improve: format adherence, task accuracy, consistency, or another measurable result.
Keep data used for evaluation separate from the examples used to train. If you evaluate on the same examples the model learned from, the result can look strong while the model performs poorly on new inputs. Include realistic edge cases in a held-out set and compare against your existing prompt or model.
Fine-tuning can also make behavior worse if examples are noisy, unbalanced, or unlike production data. Inspect errors by category rather than relying on one overall score.
Fine-tuning can teach a model recurring behavior; it is a poor substitute for a live knowledge source that changes frequently. If a policy, product catalog, or schedule changes, retrieval can provide the current document at answer time without retraining the model.
The distinction is practical: use examples to teach a repeated pattern, and use retrieval when the answer should come from current external information. Some applications need both.
Fine-tuning adds work for dataset preparation, training, versioning, and ongoing evaluation. Begin with a strong prompt and a baseline. Invest in training only when you have a repeatable task, enough quality examples, and a test that can show whether the new model is actually better.
Sources: Hugging Face fine-tuning guide, model evaluation considerations, original RAG paper.