Let's figure out what to choose — prompt engineering or fine-tuning, how they differ and how to make the decision in practice.
Three levers for controlling a model
- Prompt — controls how the model follows instructions: sets the logic, format, examples and rules of behavior.
- RAG — controls what the model knows: adds up-to-date fragments of your documents and databases to the request before the answer is generated.
- Fine-tuning — changes the model's behavior at the level of weights: locks in a consistent style, tone or specific format based on training examples.
The main confusion: fine-tuning is not a way to "load a knowledge base into the model". For up-to-date facts and internal documents you need RAG.
Order of actions: from cheap to expensive
Always move upward:
- Prompt — cheap, fast, easy to adjust without retraining.
- RAG — add it when the model lacks facts and context.
- Fine-tuning — use it only when prompts and RAG have hit a ceiling on your tests.
Diagnosis by symptoms
- The model doesn't know your data / makes up facts → you need RAG (or pass the relevant context/document in the request).
- Wrong format, structure or tone of the answer → first improve the prompt with examples, and only if that is not enough, move on to fine-tuning.
- Too expensive or slow at large volumes → take a compact model and fine-tune it for one narrow task to cut costs and latency.
Example: a delivery bot
- Without context: asked "How long does delivery to Astana take?", a bot with no source of facts may confidently invent "1–2 business days". This is not a fine-tuning problem but a lack of data.
- With a document: if you add the delivery policy ("Almaty — 1 day, other cities — 3–5 days; orders placed after 18:00 ship the next day"), the bot will answer "3–5 days", and if the information is missing, it will honestly decline to answer. No fine-tuning is needed here.
- Correcting tone/answers: if the bot answers incorrectly, it is enough to show it reference answers from managers in the prompt — often this works without RAG or fine-tuning.
Three conditions under which fine-tuning is justified
- Volume: you have hundreds or thousands of high-quality "input → reference answer" pairs.
- Clean and consistent data: the data is cleaned up and not contradictory — "dirty" examples will lock in chaos.
- Test set: you have control cases (from the lesson on prompts) to objectively measure whether things got better after fine-tuning.
Assignment
State in one sentence what exactly you don't like about the model's answers, identify the symptom, choose the right lever (prompt, RAG or fine-tuning) and test the hypothesis on test examples.