IT Vizag
← How LLMs Really Work

▶ Sign up free for the video, slides & prompts

The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.

Checking…

How LLMs Really Work · Lesson 10 of 15 · 2 min read · 5 min video

Prompting vs RAG vs fine-tuning

A simple decision guide for the three ways to customise a model.

📄 Download slides (PDF)· free sign-up

There are three main ways to make a model work for your use case. Teams often reach for the most complex one first. Here's how to choose.

Prompting

Change the instructions and examples you send.

  • Best for: tone, format, task rules, a handful of examples
  • Cost: almost nothing; changes take minutes
  • Limits: the prompt can't hold all your data, and long prompts add cost to every call

RAG

Retrieve relevant facts at question time and put them in the prompt.

  • Best for: knowledge that's large, private or changes often: policies, product catalogues, manuals, notes
  • Cost: an embedding step, a vector store, and some engineering
  • Limits: only as good as your retrieval; doesn't change the model's style or skills

Fine-tuning

Train the model further on your own examples, which changes its weights.

  • Best for: consistent style or format at scale, a narrow specialised task, or getting a smaller, cheaper model to match a big one on that task
  • Cost: you need hundreds to thousands of good examples, a training run and an evaluation process; you redo it when the base model changes
  • Limits: poor at teaching new facts reliably, and facts baked into weights go stale

The decision guide

Ask in order:

  1. Can a better prompt do it? Try clear instructions plus 3 to 5 examples. Most tasks stop here
  2. Is the problem missing or changing knowledge? Add RAG
  3. Is the problem behaviour (format, tone, a specialised skill) that prompting can't hold steady, or cost and speed at high volume? Consider fine-tuning
  4. Need both? Fine-tune for behaviour, and use RAG for facts

Examples

  • Hospital front desk bot answering from current doctor schedules: RAG, because the schedules change daily
  • Classifying 50,000 support tickets a day into 12 categories cheaply: fine-tune a small model, after proving the categories with prompting
  • Writing posts in your brand voice: a good prompt with examples first; fine-tune only if it keeps drifting
  • Answering questions about Indian tax rules: RAG over official sources, with citations
Tip: Whatever you choose, build a small test set first (next lesson). It's the only honest way to know whether fine-tuning beat a better prompt.

In one line

Prompt first; add RAG when the problem is knowledge; fine-tune only when the problem is behaviour, scale or cost that prompting can't fix.

Saved on this device. Sign in to keep progress everywhere.

Share with a friend