Fine-tuning, prompting or RAG: which to choose, and what is LoRA?
Essence
There are three ways to adapt a model to a task: prompting (explain in words and show examples), RAG (insert the needed knowledge into the request) and fine-tuning (change the model's weights on your data). The order of choice is almost always: prompting first, then RAG, and only if that's not enough — fine-tuning. The short rule: RAG adds knowledge, fine-tuning changes behavior.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep