Fine-tuning, RLHF & Alignment·Question 1 of 61BasicAI-75

When would you fine-tune a model instead of using prompting or RAG?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Fine-tune for behaviour, RAG for knowledge, prompting first for everything. The escalation path is: prompt engineering (hours, ~free) → RAG (days, adds fresh/private knowledge with citations) → fine-tuning (weeks, changes what the model is).

Full worked answer with diagram

Fine-tune for behaviour, RAG for knowledge, prompting first for everything. The escalation path is: prompt engineering (hours, ~free) → RAG (days, adds fresh/private knowledge with citations) → fine-tuning (weeks, changes what the model is).

Fine-tuning wins when you need:

  • Form/style/format: a consistent brand voice, a strict JSON schema, a house SQL dialect - things that are tedious and fragile to specify in a prompt.
  • Latency/cost: a tuned 8B model replacing a frontier API model on a narrow task, or eliminating a 2,000-token few-shot system prompt you pay for on every call (prompt caching cuts that bill, but not the context it occupies or the fragility of steering by examples).
  • Narrow skill: classification, extraction, routing - tasks where a small specialised model beats a large general one.
  • Behaviour you can't prompt into existence: reliable tool-call formatting, refusal policy, a persona that survives long conversations.

RAG wins when the requirement is factual: proprietary documents, data that changes daily, anything needing attribution. Fine-tuning is a poor knowledge store - SFT on facts gives unreliable recall, no citations, and the knowledge goes stale the moment the world changes.

Going further: follow-up territory

The nuance interviewers listen for: these are complements, not competitors. A common production pattern is RAG for facts plus a fine-tuned model that is better at using retrieved context (grounding, citing, declining when context is insufficient). Also: if the domain language itself is foreign to the model (legal, genomics), you may need continued pretraining, not just SFT. And always establish a prompted baseline plus an eval set before fine-tuning - otherwise you can't prove the fine-tune paid for itself.

Worth sketching. the branch conditions are the whole answer, and drawing them stops you reciting a list.

flowchart TD
    A["Prompted baseline<br/>plus a real eval set"] --> B{"Gap is missing facts?"}
    B -->|"yes"| C["RAG: fresh, private,<br/>citable knowledge"]
    B -->|"no"| D{"Gap is form, style<br/>or a narrow skill?"}
    D -->|"yes"| E["Fine-tune"]
    D -->|"no"| F{"Domain language<br/>itself is foreign?"}
    F -->|"yes"| G["Continued pretraining"]
    F -->|"no"| H["Stay with prompting"]
    C --> I["Common end state: RAG for facts<br/>plus a model tuned to use it"]
    E --> I

What a good answer covers

  • Fine-tune for behaviour, RAG for knowledge, prompting first for everything
  • The escalation path is: prompt engineering (hours, ~free) → RAG (days, adds fresh/private knowledge with…
  • Form/style/format: a consistent brand voice, a strict JSON schema, a house SQL dialect - things that are…
  • Latency/cost: a tuned 8B model replacing a frontier API model on a narrow task, or eliminating a…
  • Narrow skill: classification, extraction, routing - tasks where a small specialised model beats a large…

Key terms: Form/style/format · Latency/cost · Narrow skill

Interviewer follow-ups to expect

  1. Your PM says "fine-tune it on our docs so it knows our product" - how do you respond?

  2. What eval would you build before deciding?

  3. When would you do both RAG and fine-tuning?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep