SevyDevy

Module 4 · Making AI know your stuff · Lesson 21 of 32

Prompting, RAG or fine-tuning?

10 minFree GenAI course · BeginnerLesson 4.4By Saket Bhatnagar

Researched and drafted with AI, reviewed and edited by Saket Bhatnagar.

In short

  • Prompting changes the instructions, RAG gives the model the facts, and fine-tuning changes the model’s habits.
  • Start with prompting. Add RAG when the model needs your knowledge. Fine-tune last, for a style or format prompting cannot hold.
  • Real apps often mix all three: a clear prompt, retrieved facts, and sometimes a tuned model.
Soon

Video lesson · coming soon

Prompting, RAG or fine-tuning? How to choose

Lala, your AI mentor, will walk you through this lesson in a short animated video. Until then, everything is here to read and try.

  1. 01 Three months of fine-tuning, wrong fees
  2. 02 Brief, recipe book, or cooking school
  3. 03 Words, facts, or habits?
  4. 04 Climb the ladder, stop early
  5. 05 Pick the tool
  6. 06 Next: AI that takes action

Arjun is building a helper for a coaching institute in Kota. In the first meeting, someone says, “Let’s fine-tune our own model on all our notes!” It sounds serious and impressive. Three months and a big bill later, the helper still gets this year’s fee structure wrong.

The idea was not silly. It was the wrong tool for the job. This lesson gives you a plain way to pick the right one, so you don’t spend three months finding out.

Three ways to get better answers

You met prompting in module 3, and RAG earlier in this module. Fine-tuning is new, but you saw its cousin in the training lesson: the stage where a raw model practises being a helpful assistant. Fine-tuning is that same kind of practice, on your examples.

What does each one actually change?

The cleanest way to tell them apart is one question: what am I changing? The words going in, the facts going in, or the model itself?

Prompting, RAG and fine-tuning side by side
QuestionPromptingRAGFine-tuning
What changes?The instructions you sendThe facts you sendThe model’s weights
Best forTone, format, task stepsPrivate, fresh or large knowledgeA fixed style, format or narrow skill, at scale
Effort to startMinutes to hoursA few days for a simple versionDays to weeks, plus hundreds or more good examples
When facts changeEdit the promptEdit the documentsTrain again
Can it show sources?NoYes, it can cite chunksNo
Main riskLong prompts get costlyBad search gives wrong answersCost, lost general skills, still makes things up

Now, the big myth to drop. Fine-tuning is a weak way to teach facts. A model picks up patterns well, but specific facts get blurred, mixed up or lost, and you cannot see where an answer came from. Research that compares the two has generally found RAG more reliable for adding knowledge.

That is what happened in Kota. When fees changed in April, the fine-tuned model kept quoting the old fees. It would keep doing so until someone trained it again.

Climb the ladder: prompt, then RAG, then fine-tune

Most teams climb a ladder, and stop at the lowest rung that works. Each rung up costs more, so you only climb when the tests say you must.

Which tool should you reach for?

Start with a better prompt. If answers lack your facts, add RAG. Fine-tune only when a style or format still won’t stick after good prompting.

Diagram connections:

  • Better prompt first to Missing your facts? (still wrong)
  • Missing your facts? to Add RAG (yes)
  • Missing your facts? to Style still wrong? (no)
  • Add RAG to Style still wrong? (then)
  • Style still wrong? to Fine-tune (yes)
  • Style still wrong? to Ship and test (no)
  • Fine-tune to Ship and test (then)
  • Better prompt first: A clear role, context, an example and the format you want.
  • Missing your facts?: Private, fresh, or too many documents to paste every time.
  • Add RAG: Search your documents and put the right parts in the prompt.
  • Style still wrong?: A tone or format the model won’t hold across thousands of r…
  • Fine-tune: Train on good examples so the habit is built into the model.
  • Ship and test: Keep a set of test questions and check every change against…
  1. Try prompting first

    Rewrite the brief: role, context, an example, the format. Many “we need fine-tuning” problems disappear here, in an afternoon.

  2. Add RAG when knowledge is the gap

    If the answer depends on your documents, or on facts that change, retrieve them. Now you can fix an answer by editing a file.

  3. Fine-tune when habits are the gap

    If you need the same special tone or format across thousands of requests, and the long prompt is getting costly, fine-tuning can build it in.

  4. Measure at every rung

    Keep a set of test questions with good answers. Move up only when the tests show the lower rung is not enough.

Mixing them in real apps

These three are not rivals. A grown-up AI app often uses all of them. The prompt sets the role and the rules. RAG brings in today’s facts. A fine-tuned model may keep a house style without a long prompt every time.

Back to Arjun in Kota. The real fix was not a bigger training run. It was a clear prompt (“You help students of this institute; answer kindly, in short points”), plus RAG over the current fee sheet, batch timings and refund rules. When fees changed, the office updated one document. The new helper was ready in about a week.

Try it yourselfPrompting, RAG or fine-tuning?Read each situation and pick the tool you would try first. The reason appears after you choose.

Check yourself

Check yourself

The Kota institute has hundreds of pages of fees, batch timings and rules, and they change every April. Which approach keeps answers right with the least ongoing work?

Pick an answer to see why it is right or wrong.

Check yourself

Which statement about fine-tuning is true?

Pick an answer to see why it is right or wrong.

Remember these three

  1. Prompting changes instructions, RAG supplies facts, fine-tuning changes habits.
  2. Climb the ladder: prompt first, RAG for knowledge, fine-tune last, and test at each rung.
  3. For facts that change, reach for RAG, not fine-tuning.

Questions people ask

What is the difference between RAG and fine-tuning?
RAG looks up your documents at question time and puts the relevant parts in the prompt; the model stays the same. Fine-tuning trains the model on your examples and changes its weights. RAG is best for knowledge, fine-tuning for style, format or narrow repeated tasks.
When should I fine-tune an LLM?
After you have tried good prompting and RAG, and still need a consistent style, format or narrow skill across many requests. You also need a good set of examples, often hundreds or more, and tests that prove the tuned model is better.
Is RAG cheaper than fine-tuning?
Usually, both to start and to keep current. RAG needs a search store and adds tokens to each prompt, while fine-tuning has a training cost that repeats whenever things change. At very high volumes, a fine-tuned small model can sometimes be cheaper per request.
Can I use RAG and fine-tuning together?
Yes, and many mature apps do. A fine-tuned model can hold the house style while RAG supplies current facts, and the prompt sets the rules for each request.