Mid

RAG vs fine-tuning: when should you use each?

How to answer it in an AI engineer interview: what is being tested, a step-by-step framework, a sample answer and the mistakes to avoid.

$19.99 on Gumroad, instant download40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Practiced one out loud? Paste your answer into the free self-check and get a score in 30 seconds

What the interviewer is testing

Whether you choose techniques by the problem (knowledge vs behavior), start with the cheapest loop, and know that the options combine rather than compete.

Answer framework

  1. Start with prompting plus a small eval set; it is the fastest loop.
  2. Add RAG when answers depend on private or changing knowledge, or need citations.
  3. Fine-tune when you need consistent format or style, a narrow task at lower cost or latency with a smaller model, domain language the base model handles poorly, or behavior long prompts cannot hold.
  4. Rule out fine-tuning for facts that change; retrieval handles those.
  5. Say they combine: a fine-tuned model plus RAG is common.

Sample answer

I start with prompting plus a small eval set because it is the fastest loop. In-context learning changes no weights and iteration is instant, but every request pays for the extra tokens and behavior is bounded by the window.

I add RAG when answers depend on private or changing knowledge. I fine-tune when I need consistent format or behavior that prompting cannot hold, lower latency or cost via a smaller model, or I have thousands of good examples. Fine-tuning needs data, evaluation and redeployment, and it is a poor way to add frequently changing facts.

They are not exclusive: a fine-tuned model plus RAG is common. Knowledge goes in retrieval; behavior goes in the weights.

Likely follow-ups

Fine-tuning vs in-context learning: what is the difference? In-context learning puts instructions and examples in the prompt and changes no weights. Fine-tuning changes the weights with training examples, which needs data, evaluation and redeployment.

Common mistakes

The PlaybookWant the full method?

The 0 to 1 AI Engineer Interview Playbook covers the answer frameworks, system-design walkthroughs and an 8-week plan.

Get the playbook 40% off with code EARLYBF until Nov 3, 11:59 PM PTEARLYBF: 40% off until Nov 3

Smaller start: Score your answers against 50 rubrics, $9. 50 AI engineer questions, one rubric each, PDF on Gumroad.

Interviewing for PM or TPM? See the full PM package, $59 on Gumroad: a resume system, a PM, TPM and PGM interview handbook, a 1:1 cheat sheet and a PM playbook. PM and TPM content, not AI engineer prep.

Related questions

Based on question #53, #25, #9 in the full question bank.