Start with the big idea
Prompting changes the instructions. Retrieval supplies information at request time. Fine-tuning updates selected model parameters using training examples. These solve different problems.
Understand it in more detail
Retrieval-augmented generation (RAG) adds source material to the prompt at runtime, making it useful for documents that change or require attribution. It still needs access control, freshness checks and answer evaluation.
Fine-tuning adapts learned weights or small additional components to training examples. Full fine-tuning updates the base model broadly; parameter-efficient approaches can train smaller components while freezing most original weights.
LoRA represents an update to a weight matrix using a product of low-rank matrices. QLoRA combines LoRA-style training with a quantized base model to reduce memory use in suitable configurations. Neither automatically fixes hallucinations or removes the need for evaluation.
Worked example
A help desk needs yesterday's policy update: retrieve the current policy. A reporting assistant needs to consistently output a specialized structured format across many cases: consider prompting first, then fine-tuning if evaluated performance remains insufficient.
A misconception to avoid
Fine-tuning is not a reliable replacement for a constantly changing knowledge base. Performance benefits depend on task, dataset quality, validation, compute budget and deployment conditions.
Check your understanding
Think first, then open each answer to check your explanation. These self-checks do not record a score.
1. Which approach best exposes a newly edited reference document?
Retrieval at inference time, with freshness and authorization checks.
2. Does LoRA require training all base model parameters?
No. It typically trains small low-rank adaptation parameters while base weights are frozen.
Try it yourself
Create a decision table for three fictional needs: current handbook lookup, consistent extraction format and custom terminology. Include data requirements and evaluation risks.
Explain it back: Summarize the main idea in your own words and name one limitation or risk.
Continue learning
Read an independent reference: https://huggingface.co/docs/peft/index. This link is for reference, not a requirement to create an account. External websites may have different privacy and access policies.
Educational pilot. Terminology, age suitability and activities are subject to expert review. These pages do not send your answers to a server.