Fine-Tune an AI Model vs. RAG vs. Prompting (Founder Guide)

When should a startup fine-tune an AI model?

Start with a prompt and an evaluation set. Add retrieval when the model needs changing or private facts with sources. Consider fine-tuning when the task is stable, you have representative labelled examples and a good prompt still misses a repeatable behaviour. For mutable records such as order status, use a narrow tool that queries the system of record.

Score a baseline → Find the failure → Choose the fixScore a baselineFind the failureChoose the fix
Use observed failures to choose between prompt changes, retrieval and training.

1. Write down the decision the model will support

Start with one task and the person who uses the result. A SaaS support tool might draft an answer for an agent about a plan feature. A sales tool might extract product requirements into fields for a human reviewer. Define what a good response must keep, what it can infer and when it should ask for more evidence. Give each result a consequence: is the user saving a minute of editing, or relying on the answer to make a commitment?

Collect a representative evaluation set before you pick an architecture. Include straightforward questions, difficult questions, missing evidence, conflicts between documents and requests the current user should be unable to answer. Hold out real examples or carefully constructed test cases from prompt writing and training. Label the expected evidence and accepted outputs. Compare variants on the same set to see which improvement came from the architectural change.

Group failures by cause. A model may have missed a monthly policy change, followed an ambiguous instruction or produced a valid-looking field with the wrong value. Add a temporary prompt containing the actual policy passage. If the answer then works, you have evidence for retrieval. If the model still misses the format with the policy supplied, look at your instruction, schema constraints and examples before collecting training material.

2. Use prompting as the simplest baseline

Write the instruction so a teammate could apply it. Specify the intended user, the source of information, the shape of the answer and the stop condition. Include a compact example where it removes ambiguity. For structured output, use schema constraints when available, validate the result in code and decide what happens when required evidence is missing. A JSON object can pass validation and still cite the wrong line.

For a support triage workflow, start with a short prompt that asks for a product area, urgency and the evidence from the ticket for each decision. Put the approved labels and escalation criteria in a versioned configuration. On a few labelled tickets, measure field accuracy and the frequency with which human agents change the classification. If failures disappear after clarifying a confusing label, keep the simpler baseline.

Prompting works especially well where the inputs already contain the necessary facts and the rules fit comfortably in context. As the prompt grows, watch for long static examples, conflicting wording and instructions that need to change with operational policy. Track prompt versions and evaluate each release. OpenAI model optimization guide.

3. Use retrieval for changing knowledge and citations

Retrieval-augmented generation, or RAG, looks up relevant source passages at request time and adds them to the model’s input. Begin with a small approved corpus such as public docs and support policies. Give each source an identifier, version, owner and validity period. Split documents by meaningful headings when possible. Ensure that updates and removals reach the index, and propagate the access rules from the underlying source.

Check two things independently. Did retrieval find an authorised passage that contains the answer? Did the generated response faithfully reflect it? If the retriever misses a particular plan code, try exact matching or metadata filters alongside semantic search. If the model has the correct paragraph and still misquotes it, tighten the instruction or use a response structure that includes the supporting reference. Test unanswerable queries as well as positive matches.

Fetch live state such as current stock or an account entitlement from a scoped API when possible. A snapshot pasted into the search index can go stale quickly. Return only the fields needed to answer the question and display the time they were checked. Retrieval covers documentary knowledge well when you can identify the version that was active at the time. Original RAG paper and OpenAI retrieval documentation.

4. Fine-tune only when the baseline proves a repeatable gap

Fine-tuning updates model parameters or trains a small adapter to reproduce behaviour from examples. Look for a stable gap, such as consistently misclassifying complex tickets after a high-quality prompt and clear label definitions. Start collecting clean, authorised inputs and the outputs your team actually wants. Include examples near decision boundaries. Keep repeated customers or similar document templates on the same side of your split to reduce leakage.

Format and tone are plausible training targets. Current price lists and account records belong in sources you can update or query directly. Even if training examples contain a useful fact, later corrections are hard to guarantee through the model alone. If you combine tuning with retrieval, evaluate the choices independently: retrieval should still find the right passage, and the tuned model should improve the intended output using that same evidence.

Confirm your model and provider support the tuning path you want. OpenAI’s pricing documentation currently describes limits on access to its legacy fine-tuning workflow for new users. A team that controls a supported open-weight model can also consider parameter-efficient methods such as LoRA, subject to licence, data and deployment requirements. Price training runs, evaluation, hosting and future maintenance before choosing a path. Hugging Face LoRA guide.

5. Compare cost per million tokens and latency together

Use separate rates for input and output. As an illustration, assume $2 per million uncached input tokens and $10 per million output tokens for each variant. At 50,000 monthly requests, a basic prompt averaging 1,000 input and 200 output tokens costs $200 in model usage. A RAG prompt using 2,500 input and 200 output tokens costs $350. A shorter tuned prompt at the same assumed rates, using 500 input and 200 output tokens, costs $150 before training or hosting. These are proposed usage patterns and rates for comparison.

Replace the assumptions with the provider prices for the actual model, serving tier and context length. Add embedding, search, reranking and index storage to the RAG total. Add tuning runs and periodic regression checks to the tuned model total. Track the cost of a successful response, including retries and human review. A variant that costs more per request can cost less per accepted result if it causes fewer corrections. OpenAI API rates and fine-tuning availability.

Time the whole request. Capture retrieval and reranking time separately from model time to first token and total response time. Compare the median and slow tail under traffic you expect. Test long documents and cache misses. If retrieval adds delay, measure whether narrowing the candidate set or shortening the passages helps quality and speed. When fine-tuning lets you remove examples from the prompt, verify whether this improves actual latency on your deployment.

Worked example: a SaaS support assistant

Suppose an assistant tells a customer in the UK that a feature is included on their plan. The agent later discovers the answer applied to a US beta that has ended. First, run the prompt with the correct country, plan and date alongside the authorised policy. If the draft is now accurate, index the published policies with effective dates and regions. An account entitlement check should come from the service that owns the live record. Make the assistant show the policy passage and the date it was checked.

Next, suppose agents still correct the same urgency label when a ticket uses indirect language about a failed renewal. Improve the labelling guidance and compare a few representative examples in the prompt. If the error persists on a held-out set and the label definition is stable, a tuning experiment has a specific target. Retain the retrieval and entitlement checks during the experiment and test missing evidence separately. Release the change only if it improves routing without degrading grounded answers.

Bring an engineer the test questions, required evidence, current latency range and monthly traffic estimate. The first implementation can be one request path with a clear rollback, plus a report explaining which method fixed which errors. For additional background, see the INGOAMPT teaching library.

Founder decision matrix for prompts, retrieval and tuning

ApproachKnowledge freshnessStyle and formatData and costLatency
PromptingFacts are limited to prompt or attached contextGood with clear instructions and validationNeeds eval examples; billed input includes instructionsBaseline model path
RAGUpdates follow ingestion or live lookupDepends on prompting and modelNeeds approved indexed documents, serving and search costsAdds retrieval and context processing
Fine-tuningFacts age with training dataCan improve stable repeated behaviourNeeds curated examples, training and servingCan shrink inputs; hardware and model still matter

Frequently asked questions

Should I start with RAG or fine-tuning?

Start with a measured prompt baseline. If failures come from missing or changing evidence, try retrieval. If the facts are already available and the same behaviour keeps failing, test prompt and tuning changes.

Can fine-tuning and RAG work together?

Yes. Retrieval can supply current evidence while a tuned model follows a stable format or task. Measure each component on the same held-out cases.

How much does RAG cost per million tokens?

There is no universal RAG token rate. Apply the model’s input and output rates, then add retrieval, embedding, storage and any reranking costs.

Do citations guarantee an answer is grounded?

No. Check whether the retrieved passage actually supports the claim and whether it is current and authorised for the person requesting it.

Leave a reply

Your email address will not be published. Required fields are marked *