Definition
Fine-Tuning is the process of continuing the training of a pre-trained LLM on a curated dataset of domain-specific examples, adjusting the model's weights to improve its performance on target tasks or to adopt specific output formats and behavioral patterns. Unlike RAG (which provides external knowledge at inference time), fine-tuning modifies the model itself—teaching it to behave differently rather than giving it new information. The result is a model checkpoint that performs better on the target task than the base model prompted with the same instruction.
Engineering Context
Fine-tuning modifies model weights, changing how the model behaves rather than what it knows. Appropriate use cases include: achieving consistent JSON output format without lengthy prompting, adopting domain-specific vocabulary and terminology, enforcing specific tone or style, and reducing inference costs by enabling use of a smaller fine-tuned model instead of a larger prompted one. Anti-patterns include: using fine-tuning to inject factual knowledge (use RAG instead—fine-tuned factual knowledge can become stale and hallucinations increase), fine-tuning without 100+ high-quality examples (results are typically poor), and ignoring catastrophic forgetting (fine-tuning can degrade performance on tasks not represented in the training data). Always evaluate fine-tuned models against a held-out evaluation set before deploying.
Related Terms
Building production AI agents?
We design and implement deterministic AI agent systems for enterprise teams.
Start Assessment