Private LLM & Secure RAG | | 14 min read
RAG vs Fine Tuning: How to Choose for Enterprise AI
RAG vs fine tuning asks what you want to change: the information an application sends to its model, or the model itself. I'd usually start with RAG for documents that keep changing. Fine tuning is worth investigating when an assistant keeps mishandling a task even with the right input. You can combine them, but I'd want to see what each adds before supporting both.
Key Takeaways
The next change should address the failure you can demonstrate.
Check what reaches the model
A missing or superseded passage is a source and retrieval problem. Inspect the actual context before paying for training.
Test the combination
In GS's reanalysis, adding retrieval changed from a gain to a loss after ordinary fine tuning in three of five task columns.
Keep the comparator honest
A hybrid should earn its place against the stronger simpler approach. Tiny score differences need scrutiny before they justify more operating work.
Imagine asking a service assistant which recovery procedure to follow. It gives you a plausible answer and cites the runbook. Then you open the link and find last year's instructions.
At that point, I wouldn't have a training recommendation. I'd have a question for whoever built the assistant: can we look at the request it sent to the model? If that request contains only the old runbook, there's a document problem to sort out first. If it contains the approved revision and the answer still follows the old one, now we have something else to investigate. Paying for training before checking this could mean weeks spent working on the wrong part of the application.
RAG vs fine tuning: what changes in the application?
| Decision | RAG | Fine tuning | Both |
|---|---|---|---|
| What changes? | The application retrieves source material and adds it to the request. | Additional training changes model parameters or adapters. | The adapted model receives retrieved material. |
| Good reason to test it | Answers depend on changing records or need evidence from a larger collection. | The model repeatedly mishandles a task despite having suitable input. | The application needs current sources and demonstrated improvements in using them. |
| Data preparation | Maintain source authority, useful chunks, access metadata and retrieval tests. | Prepare permitted training examples and a separate evaluation set. | Prepare both, including examples of realistic retrieved context. |
| What remains unresolved? | Retrieval can miss a passage. The model can still misread it. | New facts and individual source permissions do not update themselves. | Each component still needs testing, support and recovery. |
| Recurring cost | Connectors, indexing, search, context tokens and investigation. | Serving, evaluation, retraining and release management. | Both sets of work, plus testing their interaction. |
AWS's technical comparison describes these approaches and their combination. Hosting is a separate choice: a privately hosted model can use either. Our private LLM vs RAG guide covers that distinction.
Is RAG better than fine-tuning?
For current documents and answers that people can trace back to a source, RAG is where I'd start. But say you've already supplied the right passage, explained the task clearly and the model still files the ticket under the wrong category. That's a reason to investigate fine tuning. Neither approach will fix every bad answer. You can also test a model that's been tuned and give it retrieved material.
Changing the document is only the start of a Monday update. Someone has to check that the retrieval service selects the revision, deals with the superseded copy and respects the requester's access. Otherwise you can have the latest file sitting in the store while users keep getting the same old answer. I'd check the source material in an actual request before considering that update finished.
For the ticket category problem, there are a few cheaper things to try before preparing a training dataset. Make the instructions clearer, constrain the output and validate it. If the same mistake survives those changes across representative cases, training examples may help. I'd keep a separate set of cases out of training so the evaluation can tell us whether anything improved.
GS Consulting helps teams make that decision through private LLM and secure RAG implementation. The Private LLM and Secure RAG hub connects the supporting architecture, security and evaluation guides.
Original GS analysis: when retrieval changes from a gain to a loss
GS Consulting analyzed 25 published scores across five task columns in Zhang and colleagues' RAFT paper, version 2, Table 1. We calculated how adding retrieval changed each task's score before and after ordinary domain fine tuning. The experiments were conducted by the paper's authors; the extraction, paired calculations and threshold checks are ours.
In three of the five task columns, retrieval helped the base model but hurt the ordinarily fine tuned model. Those reversals occurred in HuggingFace, Torch Hub and TensorFlow. This is a count of the selected task columns, not a failure rate for enterprise AI.
| Task | Base model | After ordinary fine tuning | Change in retrieval effect |
|---|---|---|---|
| PubMed | +2.30 | +11.90 | +9.60 |
| HotPot | −0.51 | −1.97 | −1.46 |
| HuggingFace | +26.21 | −18.47 | −44.68 |
| Torch Hub | +8.60 | −2.14 | −10.74 |
| TensorFlow | +43.06 | −26.27 | −69.33 |
For HuggingFace, the calculation is straightforward. Retrieval changed the base score from 0.22 to 26.43, a gain of 26.21 points. After ordinary fine tuning, adding retrieval changed 61.06 to 42.59, a loss of 18.47 points. The difference between those retrieval effects is −44.68 points.
What should you do with that? When a tuned model struggles after you connect retrieval, examine the material and format it was trained to use. Training on isolated questions and answers may prepare it for a different job from reading a mix of relevant passages and distractions. The paper's context trained RAFT recipe addresses that issue. Our calculations do not isolate the cause of each error.
The paper uses historical LLaMA2 configurations. The five columns have different tasks, and three belong to one API benchmark suite. We therefore keep the rows separate and do not average them into an overall score. Aggregate results also cannot tell us whether a particular failure came from search, context handling or answer evaluation.
A hybrid can win by a margin that does not justify the extra work
We also compared RAFT with the stronger of ordinary fine tuning alone and the base model with RAG, within each task. Its reported lead was positive in all five columns. In two, however, the difference was only 0.01 or 0.30 points.
A screening threshold of more than one point leaves three hybrid leads. Requiring more than five points also leaves three. For retrieval reversals, those same thresholds leave three and two respectively. The thresholds are GS analytical choices. They are not tests of statistical significance, and the published aggregate scores do not supply the uncertainty estimates needed for that claim.
A separate AWS experiment published in May 2025 illustrates another comparison problem. RAG had the higher BERTScore; the hybrid had the higher LLM evaluator score. From its reported means, we calculated that hybrid inference took about 2.12 times as long as RAG. The source used a synthetic product catalog, so this is a separate example, not a replication of the RAFT results.
Before a pilot, agree on what the quality measure represents and how much improvement would be useful. A higher score on one evaluator may still leave the person reviewing the answer with more work.
A worked diagnosis: the runbook answer and the ticket summary
Consider a fictional internal service assistant. An analyst asks it to identify the current recovery procedure and draft a structured ticket summary. A person reviews the draft before any operational action. This is a proposed test scenario, not a GS client result.
The first draft cites an old procedure. When the engineer looks at the saved context, the current version isn't there. The assistant was given only the superseded copy, so another training run wouldn't correct the document it had to work from. Before changing the model, the engineer checks source versions, indexing and ranking, then repeats the request with the current approved passage supplied directly.
A corrected answer would give the engineer a reason to focus on retrieval next, although that one test wouldn't establish the cause of every failure. A wrong answer would leave more to investigate: perhaps the passage is unclear, perhaps another instruction conflicts with it, or perhaps the model isn't handling the evidence well. Either way, there's now a specific request to examine instead of a general argument about which technique is better.
The ticket summary has a separate failure. It describes the incident accurately but keeps putting free text into a field that accepts a fixed category. Schema validation catches the bad draft. Clearer instructions and constrained output may resolve it. If they do not, the team can evaluate fine tuning with approved examples and hold back cases that were never used in training.
If the assistant needs current runbooks and fine tuning helps it carry out the task, there's a reason to test the combination. I'd be careful about what goes into that training set. An example with one obvious answer passage doesn't look much like a request containing several search results, some irrelevant or in conflict. The evaluation needs those messy cases, and the training examples need to resemble the approved context the assistant will receive.
Security remains a separate acceptance condition. A user who cannot open a restricted runbook should not receive its contents through the assistant. OWASP's vector and embedding guidance describes retrieval risks. Our secure RAG design guide explains the architecture choices for enforcing access.
Is there anything better than RAG?
A retrieval service isn't necessary for every task. Someone summarizing one approved document may be able to supply it with the prompt, and someone asking for a value in a database may be better served by an authorized query. For applications that do need retrieval, I'd compare improvements to search with training the model to use context. Use the same cases and acceptance criteria for those comparisons.
If somebody has already supplied the entire approved document and only wants a summary, I'd first find out whether the model can read it accurately within its context limit. There may be no reason to add a retrieval service for that job. And for something like a current invoice total, I would rather ask the system of record through an authorized database query than search documents for a mention of the figure.
For a large document collection, RAG may still fit well. The useful improvement could be better parsing or ranking, not a new model. A scan that loses a table header can turn an apparently relevant passage into misleading input. Check what survived ingestion before blaming generation.
How should you compare RAG vs fine tuning cost?
Compare the cost of an accepted task over the same workload and period. Include preparation and engineering, then the recurring cost of running, reviewing and maintaining each option. A cheaper model response can become an expensive task if someone has to repair it.
- RAG: Count source preparation, connectors, index refresh and retrieval. Include context tokens, permission maintenance and investigation when the wrong material is returned.
- Fine tuning: Count example preparation, training and evaluation. Include serving, regression tests, retraining and the work of managing model releases.
- Combined approach: Count both sets of costs and the effort of testing changes together. A retrieval update can affect the behavior of a model that was trained on a different context pattern.
For a defined period, divide attributable total cost by the number of outputs that pass the agreed acceptance checks. Keep reviewer time and failed attempts in the numerator. Report throughput and latency alongside that figure so a slow queue does not disappear inside an average.
The result needs your usage pattern and labor assumptions. We have not established a universal token volume at which training or private hosting becomes cheaper. The private LLM cost guide develops the broader operating cost question.
What should the pilot test before you choose?
Use one task definition and the same held out cases across the approaches. Keep a record of the model, prompt and source versions for each run. Without that, an apparent improvement may come from changing the test.
- Establish the simpler baseline. Test clear instructions with approved supplied input. Record quality, review effort and failure types.
- Test the evidence path. Include missing passages, superseded instructions and sources the requester cannot access. Check both retrieval and the generated answer.
- Test task behavior. Include required fields, categories, unsupported questions and cases requiring escalation. Validate structured output before it reaches another system.
- Compare justified alternatives. Add retrieval, tuning or both when the failure analysis supports that change. Do not reuse training examples as the final evaluation.
- Make the release decision. Review critical failures separately from the average. Assign support ownership, retain the evidence and test how to stop or roll back the workflow.
For sensitive information, the review also needs documented authority for the proposed training and inference uses. Check where training files, model artifacts, prompts and logs may go. RAG and fine tuning are architecture techniques; their names do not establish permission to process data or compliance with a contract.
The private LLM evaluation framework goes deeper into release tests. NIST's Generative AI Profile provides broader risk management guidance. Set the acceptance criteria for your workflow rather than treating a published benchmark as its approval.
Bring one failing task to the architecture review
GS Consulting can help trace what reached the model, define a useful evaluation and compare the implementation options. Start with a general description of the workflow and the output that needs to improve.
Discuss your AI workflowIs fine-tuning debunked?
No. In machine learning, fine tuning is an established way to adapt a pretrained model. Whether a particular tuning job is worthwhile depends on its training data, evaluation results and operating cost. It does not automatically keep changing facts current, enforce source permissions or eliminate errors.
The RAFT study and AWS experiment linked above are concrete examples of evaluating adaptation. Their different configurations and outcomes are a reason to test a proposed use carefully. They do not support a claim that every tuning job helps, or that one disappointing result invalidates the technique.
What makes a tune a RAG?
In music, a rag is associated with ragtime: a syncopated melody played against a steady accompaniment. The Library of Congress explains that musical history. That use of “rag” is separate from retrieval augmented generation. In this article, RAG means retrieving source material to inform a model's response.
Research method, sources and downloadable data
The original GS contribution is a reproducible reanalysis: paired retrieval changes, a difference between those changes, a comparison against the stronger standalone configuration and threshold checks. We also provide a proposed diagnostic workflow. The underlying model experiments and published scores belong to their original authors. GS did not retrain or rerun those models.
The main dataset includes every task column and the five LLaMA2 family configurations in RAFT v2 Table 1. We exclude the GPT-3.5 reference row from the paired analysis because it uses a different model family. Differences are calculated within a task on the paper's displayed scale; we do not pool task metrics or combine the AWS and RAFT scores.
The AWS code repository was inspected at commit f1441e9bcb0140adff6109b82613c13f1d4dd981. The per sample output files described by its article were not present in that tree. We therefore use only the article's aggregate means and make no claim about paired per question wins or statistical significance.
- Download the research workbook: source scores, formulas, assumptions, sensitivity checks and provenance.
- Download the reproducible research package: CSV datasets, JSON analysis, method, source register and generator.
- Download the derived comparison data or the source score transcription.
Sources were accessed October 27, 2026. The workbook's source register identifies versions, locations and limitations. This is a GS Consulting derived planning analysis of cited public results, not an official legal, audit, compliance, NIST, OWASP or regulatory determination. The task counts do not estimate success probabilities, and no benchmark, savings or latency result here is a promise for a client deployment.