# Set Your Training Goal: Prompt, RAG, or Fine-Tune?

The most expensive mistake in local AI is not a failed training run — it's a *successful* training run that solves the wrong problem. Before your dragon eats a single example, you need a precise training goal and proof that fine-tuning is even the right tool. This lesson gives you a decision framework used by teams who ship fine-tuned models for real.

## The Three Tools, Honestly Compared

When a model doesn't do what you want, you have three escalating options:

**1. Prompting (free, instant).** Write better instructions, add examples in the prompt (few-shot), define the output format. This fixes more problems than most people believe.

**2. RAG — Retrieval-Augmented Generation (cheap, fast to build).** Store your documents in a search index; retrieve relevant chunks and paste them into the prompt at question time. This is the correct tool whenever the problem is *the model doesn't know my facts*.

**3. Fine-tuning (this course).** Actually change the model's weights with training examples. The correct tool when the problem is *the model doesn't behave the way I need* — wrong tone, wrong format, ignores instructions specific to your task, doesn't speak your domain's language.

<div class="concept-box">
<h4>Concept</h4>
The one-line rule the whole industry uses: <strong>fine-tuning teaches behavior, RAG provides knowledge.</strong> Facts change — put them in a database. Behavior is stable — bake it into the weights. Many production systems use both: a fine-tuned model <em>plus</em> RAG.
</div>

Here is the decision as a flowchart:

<svg viewBox="0 0 720 420" width="100%" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Decision flowchart: prompt vs RAG vs fine-tune">
    <defs>
    <marker id="arr" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
      <path d="M0,0 L8,4 L0,8 z" fill="#7b8cff"/>
    </marker>
  </defs>
  <rect x="230" y="16" width="260" height="52" rx="10" fill="rgba(123,140,255,0.08)" stroke="#7b8cff" stroke-width="1.5"/>
  <text x="360" y="38" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">The model isn't doing</text>
  <text x="360" y="57" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">what I need</text>
  <path d="M360 68 L360 100" stroke="#7b8cff" stroke-width="1.5" fill="none" marker-end="url(#arr)"/>
  <rect x="215" y="100" width="290" height="52" rx="10" fill="rgba(123,140,255,0.08)" stroke="#7b8cff" stroke-width="1.5"/>
  <text x="360" y="122" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">Did I try serious prompting</text>
  <text x="360" y="141" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">with few-shot examples?</text>
  <path d="M215 126 L120 126 L120 180" stroke="#7b8cff" stroke-width="1.5" fill="none" marker-end="url(#arr)"/>
  <text x="130" y="118" fill="#4fffb0" font-family="monospace" font-size="12px">no</text>
  <rect x="30" y="180" width="180" height="52" rx="10" fill="rgba(79,255,176,0.08)" stroke="#4fffb0" stroke-width="1.5"/>
  <text x="120" y="202" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">Fix the prompt first.</text>
  <text x="120" y="221" text-anchor="middle" fill="#9aa3b5" font-family="-apple-system, sans-serif" font-size="12px">Free. Do this today.</text>
  <path d="M360 152 L360 190" stroke="#7b8cff" stroke-width="1.5" fill="none" marker-end="url(#arr)"/>
  <text x="370" y="176" fill="#4fffb0" font-family="monospace" font-size="12px">yes, still bad</text>
  <rect x="215" y="190" width="290" height="52" rx="10" fill="rgba(123,140,255,0.08)" stroke="#7b8cff" stroke-width="1.5"/>
  <text x="360" y="212" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">Is the problem missing or</text>
  <text x="360" y="231" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">changing facts / documents?</text>
  <path d="M505 216 L600 216 L600 270" stroke="#7b8cff" stroke-width="1.5" fill="none" marker-end="url(#arr)"/>
  <text x="560" y="208" fill="#4fffb0" font-family="monospace" font-size="12px">yes</text>
  <rect x="510" y="270" width="180" height="52" rx="10" fill="rgba(251,191,36,0.08)" stroke="#fbbf24" stroke-width="1.5"/>
  <text x="600" y="292" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">Use RAG.</text>
  <text x="600" y="311" text-anchor="middle" fill="#9aa3b5" font-family="-apple-system, sans-serif" font-size="12px">Facts live in an index.</text>
  <path d="M360 242 L360 280" stroke="#7b8cff" stroke-width="1.5" fill="none" marker-end="url(#arr)"/>
  <text x="370" y="266" fill="#4fffb0" font-family="monospace" font-size="12px">no — it's behavior</text>
  <rect x="215" y="280" width="290" height="60" rx="10" fill="rgba(79,255,176,0.08)" stroke="#4fffb0" stroke-width="1.5"/>
  <text x="360" y="305" text-anchor="middle" fill="#e6e9f0" font-family="-apple-system, sans-serif" font-size="15px">Fine-tune. This course.</text>
  <text x="360" y="326" text-anchor="middle" fill="#9aa3b5" font-family="-apple-system, sans-serif" font-size="12px">Tone, format, task discipline, domain style</text>
  <path d="M360 340 L360 372" stroke="#7b8cff" stroke-width="1.5" fill="none" marker-end="url(#arr)"/>
  <text x="360" y="396" text-anchor="middle" fill="#9aa3b5" font-family="-apple-system, sans-serif" font-size="12px">Often the real answer: fine-tuned model + RAG together</text>
</svg>

## Good and Bad Fine-Tuning Goals

**Goals fine-tuning is great at:**

- *"Answer support questions in our brand voice, always ending with a next step."* — tone + format ✔
- *"Turn messy meeting notes into our exact status-report template."* — structured transformation ✔
- *"Classify incoming emails into our 12 internal categories."* — task discipline ✔
- *"Write product descriptions that sound like our catalog, in Romanian."* — style + language ✔
- *"Always output valid JSON matching our schema."* — format reliability ✔

**Goals that will end in tears:**

- *"Teach the model our 2026 price list."* ✘ — facts change; use RAG. The model will hallucinate prices with total confidence.
- *"Make a 4B model as smart as Claude."* ✘ — fine-tuning doesn't add reasoning capacity; it shapes what's already there.
- *"Train it on all our documents so it knows everything."* ✘ — dumping raw documents into fine-tuning teaches the model to *imitate your documents*, not to answer questions about them.

<div class="honest-note">
<h4>Honest Note</h4>
If someone tells you they fine-tuned a model "to know their company data", either they actually built RAG, or their model confidently invents company data. Fine-tuning on raw documents is the single most common beginner mistake in local AI — and now it's one you'll never make.
</div>

## Our Course Project: Define Ember's Job

For the rest of this course, Ember's training goal is one of the strongest use cases for a local model:

> **Ember is a customer-support assistant for a small online shop. It answers in the shop's friendly-but-precise voice, in the customer's language, always structures answers as: short answer → explanation → concrete next step, and refuses to invent order details it doesn't have.**

Notice what this goal is made of: **voice** (behavior), **structure** (format), **discipline** (refusing to hallucinate). All weight-worthy. The *facts* about specific orders would come from a database at runtime — not from training.

## Write a Goal Card Before You Train Anything

<div class="pro-tip">
<h4>Pro Tip</h4>
Professionals write the evaluation before the training. If you can't describe how you'll <em>measure</em> success, you don't have a training goal yet — you have a wish.
</div>

Your goal card has four lines. Here's Ember's:

- **Task:** answer customer-support questions for an online shop
- **Behavior:** friendly-precise voice; structure: answer → explanation → next step; never invent order data
- **Success test:** on 30 held-out test questions, ≥25 follow the structure and 0 invent facts
- **Non-goals:** product knowledge (RAG's job later), languages beyond EN/RO

<div class="try-it">
<h4>Try It</h4>
Write your own goal card — four lines, real numbers in the success test. If your "Behavior" line contains the words "knows" or "remembers", stop and move that part to the Non-goals line: that's RAG. Keep this card; in lesson 6 it becomes your evaluation checklist.
</div>

<div class="checkpoint">
<h4>Checkpoint</h4>
You can explain fine-tuning vs RAG in one sentence, you know which goals are weight-worthy, and you have a written goal card with a measurable success test. Next: the memory math that tells you exactly what your machine can train.
</div>
