Skip to content
RED SAGSkills
mediumMachine Learning Engineer interview question

A team wants an LLM to answer questions about their internal products. How do you decide between prompting, RAG and fine-tuning?

What the interviewer wants to hear

  • Start with prompting and a strong base model as the baseline
  • RAG adds knowledge that changes often and allows citations
  • Fine-tuning changes behaviour, style or format, not fresh facts
  • Consider cost, latency, data available and maintenance
  • Decide using an evaluation set, not intuition

Model answer

I start with the cheapest option: a good model with a clear prompt and a few examples, measured on an evaluation set of real questions. If the failures are about missing or out-of-date knowledge, which is likely for internal products, I add RAG. It keeps facts in documents that can be updated daily, supports citations and respects permissions. Fine-tuning is better when the problem is behaviour: a strict output format, a domain style, or a narrow task where a smaller fine-tuned model could replace a big one to cut latency and cost. I would use parameter-efficient methods like LoRA and need a few thousand quality examples. Fine-tuning is a poor way to inject facts that change often. Often the answer is RAG plus a little fine-tuning, chosen by comparing options on the same evaluation set.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Machine Learning Engineer questions