Unit 3/Lesson 3 of 3

RAG vs. Fine-Tuning vs. Prompting

Three techniques for improving an LLM's knowledge and behavior: prompting (in-context examples), RAG (retrieval-augmented generation, giving the model fresh data at query time), and fine-tuning (updating model weights on your data). Knowing when to use each is a key PM decision.

SkillsRAG architectureFine-tuning use casesMake-vs-buy reasoning
+30 XP
✏️ On desktop — select text to ask Nobi, save notes, or add thoughts

Prompting: in-context learning

The simplest approach: include the information the model needs in the prompt itself.

Zero-shot — just instructions: "Analyze this SMB and identify their top 3 digital growth challenges."

Few-shot — instructions + examples: include 2–3 examples of ideal analysis before the model's task. Few-shot is reliably more accurate than zero-shot for structured tasks.

When prompting is sufficient:
- The task requires reasoning, not domain-specific knowledge
- The knowledge needed is already in the model's training data
- Volume and latency allow for larger prompts
- The output format is consistent and can be specified in the prompt

When prompting breaks down:
- You need the model to use specific, up-to-date facts (a specific SMB's review scores from last week — not in training data)
- You need the model to know about internal company-specific data (BuzzBoard's proprietary SMB database — never in training data)
- Your prompt is growing so large it degrades performance or costs too much

For BuzzBoard's use case, pure prompting doesn't work for IRIS because the facts it needs (an SMB's current digital footprint) change constantly and don't exist in any model's training data. You need retrieval.

囲
Kiaiきあい

Fighting spirit — the energy to engage directly. Prompting is kiai: you meet the task directly with the model's own knowledge and reasoning, no support needed. Powerful when the model has what it needs; insufficient when it doesn't.

RAG: retrieval-augmented generation

RAG adds a retrieval step before the model call: instead of relying on what the model knows from training, you fetch relevant, current data and inject it into the prompt.

How RAG works:
1. User asks a question or triggers a task
2. A retrieval system fetches relevant documents (from a vector database, a web scraper, a SQL query, an API)
3. The retrieved content is added to the model prompt as context
4. The model generates a response grounded in the retrieved data

When RAG is the right choice:
- The task requires current, frequently-updated information (SMB review scores, website content, ad spend signals)
- The knowledge base is too large to fit in a prompt or fine-tuning dataset (millions of SMB profiles)
- You want the model's response to be *grounded* — traceable to specific source documents (for explainability and debugging)
- The information is proprietary and can't be baked into model weights

IRIS is fundamentally a RAG system: it retrieves an SMB's current digital footprint (web scraping, review APIs, ad intelligence) and passes that data to Claude or GPT-4o for synthesis. The model doesn't "know" about ACME Plumbing — IRIS fetches what it needs in real time.

RAG failure modes PMs must spec for:
- Retrieval quality — bad retrieved content produces bad model output, even if the model is excellent. Garbage in, garbage out.
- Retrieval latency — fetching from 5 sources before every model call adds latency. Pre-compute where possible.
- Hallucination on gaps — if retrieval comes back empty, the model may hallucinate rather than say "I don't know." Spec explicit behavior for empty retrieval results.

Fine-tuning: when to train

Fine-tuning means continuing training on the base model with your own dataset — actually updating the model's weights to internalize your domain knowledge, style, or format requirements.

When fine-tuning is worth it:
- You have a large, high-quality labeled dataset of input/output pairs (thousands to tens of thousands)
- The task has a very specific format or style that's hard to achieve consistently via prompting
- You're calling the model at extremely high volume and can justify the upfront fine-tuning cost through ongoing inference cost reduction (fine-tuned models on smaller base models can match larger models on specific tasks at lower cost)
- Latency is critical and you need to reduce prompt length by baking instructions into weights

When fine-tuning is NOT worth it:
- Your data changes frequently (fine-tuned knowledge becomes stale)
- You're early-stage with a small dataset — the model will overfit
- The task can be accomplished with prompting + RAG at acceptable quality
- You don't have the ML infrastructure to manage fine-tuned model versions

For BuzzBoard: the most plausible fine-tuning use case is for Zylo's outreach drafting — if BuzzBoard accumulates thousands of high-performing outreach messages (with reply rates as quality labels), fine-tuning on that dataset could produce a custom model that matches brand voice and performs better on SMB-specific outreach than any general-purpose model. But this is a Phase 3 investment, not a Phase 1 move.

The PM decision: start with prompting, add RAG when you need current or proprietary data, consider fine-tuning when you have enough data and clear quality/cost gains to justify it.

Ask Nobiexplain

Select any text in the lesson to ask a question. Press Esc to close.

1 / 3

IRIS needs to know an SMB's current Google review count, average rating, and most recent review topics. Which technique is correct and why?