Use retrieval when the main problem is access to relevant knowledge; investigate fine-tuning when a measured behavior problem persists despite a good prompt and context. These approaches can work together. Neither guarantees correct answers, privacy or lower cost. Make the choice using representative tasks and an evaluation set.
Separate knowledge from behavior
A support assistant may need the current returns policy and the user's order status. A document processor may already receive all relevant text but repeatedly label categories incorrectly. Those are different failure modes.
Before choosing an architecture, collect examples of unsuccessful outputs and classify them. Was the necessary information absent, retrieved incorrectly, misunderstood, formatted incorrectly or unavailable to that user? An expensive model change will not repair a broken permissions filter or a missing document.
What retrieval changes
Retrieval-augmented generation supplies selected material at request time. The source can be document search, a database query or another controlled lookup; it does not have to be a vector database. The application chooses what to retrieve and what the model receives.
This makes source freshness and attribution manageable, but retrieval can return irrelevant, incomplete or conflicting material. Documents also need access controls, ownership and update procedures. Placing content in an index does not automatically make it safe to expose to every user.
Test the retrieval stage independently. If a policy answer is wrong, inspect whether the correct policy was available, whether it was selected and whether the final answer faithfully used it. Otherwise you may change the generator to compensate for an indexing defect.
What fine-tuning changes
Fine-tuning adjusts model behavior using a suitable training method and examples. It can be considered for tasks where the desired response pattern is stable and measurable. Availability, supported methods and deployment arrangements depend on the chosen model and provider.
Do not treat training as a reliable store for frequently changing prices, permissions or customer records. Also do not assume a tuned model will always return valid structured data or run faster. Measure those properties under the actual serving configuration and retain output validation.
Separate training data from evaluation data. If the same examples appear in both, a strong score may reflect memorization rather than performance on new cases. Decide who can supply and approve examples and how sensitive data is handled.
Use a decision table
| Main requirement | First experiment | Evidence to collect |
|---|---|---|
| Answers must use current policies | Permission-aware retrieval | Correct source selection and faithful answers |
| Consistent classification of supplied text | Prompt and schema baseline, then consider tuning | Held-out category accuracy and error cost |
| Customer-specific account facts | Authenticated system lookup | Authorization and data freshness |
| A stable response style | Prompt examples before tuning | Quality ratings across diverse tasks |
| Both fresh facts and a recurring behavior gap | Evaluate retrieval and tuning separately | Contribution and cost of each component |
This is a sequence of experiments, not a universal ranking of technologies. A simpler deterministic workflow may outperform either approach for a narrow rules-based task.
Build the evaluation before the pipeline
Select real task types and write the expected evidence for each. Include missing information, contradictory documents, old versions, unauthorized requests and ambiguous wording. Define when the correct response is to ask a question or decline to answer.
Measure source correctness, answer correctness, inappropriate disclosure, latency and total cost per completed task. Count human review and rework as costs. A system that produces a cheap answer but needs frequent correction may be more expensive operationally.
Run the same held-out set against the baseline and each candidate. Keep the prompt, model version and retrieval configuration with the result so the comparison is reproducible.
Design privacy and security across the full route
Review where prompts, retrieved text, outputs and logs are processed and retained. Data does not remain inside your database merely because retrieval begins there; selected passages may be sent to an inference service. Check provider terms and the application's own storage behavior.
Treat external documents as untrusted input. They can contain misleading instructions. Keep authorization in application code and restrict tools separately from model instructions. The OWASP GenAI Security Project is a starting point for threat-model review, not a substitute for testing your implementation.
Make the smallest justified investment
For an internal policy assistant, a useful first release might support one approved document collection, show source links and escalate unsupported questions. A later evaluation can justify broader coverage or tuning if a specific behavior gap remains.
Explore generative AI integration, AI model development and our AI product release checklist.
Common questions
Can RAG and fine-tuning be combined?
Yes. Evaluate the contribution of each separately so added complexity has a measurable reason.
Does either approach eliminate hallucinations?
No. Use validation, evidence, uncertainty handling and human review appropriate to the consequence of an error.




