C.W.K.
Stream
Lesson 05 of 08 · published

Why Fine-Tune (vs. Prompt, vs. RAG)

~20 min · training, decision

Level 0Scout
0 XP0/50 lessons0/10 achievements
0/120 XP to next level120 XP to go0% complete

Three knobs in the tool drawer

Before you fine-tune, ask whether you should. The decision tree:

  • Prompt engineering — adjust the system prompt, the chat template, the few-shot examples. Cost: hours. Solves: behavior steering, simple format requirements, persona, style.
  • RAG (retrieval-augmented generation) — pull relevant context from a vector store at inference time. Cost: days. Solves: domain knowledge, freshness, citation, large knowledge bases.
  • Fine-tuning — modify the weights with task-specific data. Cost: weeks (data + compute + eval). Solves: deep style/domain mastery, latency reduction (model knows X without re-explaining), vocabulary adaptation.

The fine-tune trigger conditions

  • Prompt-only solutions are unreliable on your eval set after multiple iterations.
  • RAG context windows are blowing your latency budget.
  • You have at least 1k high-quality examples (often 10k+ for visible quality jumps).
  • You have GPU budget for both training and ongoing eval.

If you're fine-tuning to "teach the model facts," that's almost always a RAG problem in disguise. Fine-tuning teaches behavior, not facts.

Code

Fine-tune vs prompt vs RAG: pseudo-decision·python
def choose_strategy(eval_score_with_prompt, latency_budget_ms, has_facts_to_inject, num_examples):
    if eval_score_with_prompt >= target_score:
        return "stay with prompt engineering"
    if has_facts_to_inject and latency_budget_ms > 500:
        return "RAG"
    if num_examples >= 1000 and gpu_budget_available:
        return "fine-tune (start with LoRA)"
    return "collect more data, retry"

External links

Exercise

Pick a real task you have. Define a target metric. Build three baselines: (1) zero-shot prompt, (2) few-shot prompt, (3) RAG with a small knowledge base. Score each. Only after all three plateau, plan a fine-tune that's clearly worth the cost.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.