Explainer
What is fine-tuning?
Fine-tuning vs prompting vs RAG
Prompting steers a model with instructions at runtime. RAG adds retrieved facts to the prompt. Fine-tuning changes model weights so preferred patterns become more native. Many products combine all three.
When fine-tuning helps
Consistent style, specialized formats, domain jargon, or classification tasks with many labeled examples. It is less ideal as the first fix for "the model does not know our latest policy" — that is usually a retrieval problem.
Examples
- Training a model to always output a strict JSON schema
- Teaching a support tone that matches brand guidelines
- Improving classification of internal ticket categories
Common questions
Is fine-tuning required to use an LLM well?
Usually no. Start with good prompts, evaluation, and RAG if you need private or fresh knowledge. Fine-tune when those are not enough.
Does fine-tuning stop hallucinations?
Not reliably. It can reduce some failure modes, but factual grounding still benefits from retrieval, tools, and review.
Glossary terms
Keep reading
- What is an LLM?
An LLM (large language model) is software trained on huge amounts of text so it can predict and generate language. It does not think like a person; it estimates likely next words, sentences, and answers based on patterns it has seen.
- What is RAG?
RAG stands for retrieval-augmented generation. It means an AI system first retrieves relevant information from a knowledge source, then uses that material to generate an answer. This helps ground responses in specific documents instead of only the model's training memory.
- Prompt vs context engineering
Prompt engineering focuses on how you phrase instructions to a model. Context engineering focuses on what information you put around those instructions — documents, tools, memory, examples, and constraints. Strong systems need both, but weak context usually fails before weak wording does.
- What are embeddings?
Embeddings are numeric representations of content—usually lists of numbers—that place similar meanings closer together in a vector space. They let software compare text, images, or other items by meaning instead of exact keyword match.