Model strategy
RAG vs Fine-Tuning for AI Products
Use a practical comparison to decide how an AI feature should access facts and learn consistent behavior.
Retrieval-augmented generation (RAG) and fine-tuning solve different problems. The product decision starts with a failed task. Was the required fact missing from the input? Did the model ignore information already in front of it? Could a direct lookup solve the user’s need? The answers determine what to test before committing to an architecture.
Sort the errors by what the model had available
Consider a fictional support assistant that answers questions about replacement parts. It gives an outdated return window for one region and produces a draft without a required reason code on another ticket. The first issue concerns access to a current policy. The second could be an unclear output specification, a validation gap, or inconsistent model behavior. Give reviewers the policy context, the generated output, and the expected behavior so they can tell those failures apart.
Try a direct workflow first for requests with a known key and a structured answer. An agent entering a part number and region might only need the applicable policy and its effective date. A search box and a structured record can be enough. Keep that baseline in the evaluation even if other requests benefit from a model.
Use retrieval when the answer depends on current sources
RAG retrieves relevant material at the time of the request and passes it to a generative model as context. This makes sense when a service needs to pull from a collection of changing documents and explain the relevant passages in plain language. The original RAG paper describes combining learned model knowledge with an external retrieval index. Lewis and colleagues’ original RAG paper
Test whether the retrieved policy applies to the user’s product, region, and date, then check whether the reply faithfully uses it. A plausible answer can still be based on an unrelated or superseded source. Define the behavior for missing and conflicting evidence, such as asking one clarifying question or routing to an agent. Budget for policy updates, indexing, and review alongside generation.
Consider tuning for a repeated behavior gap
Fine-tuning adapts a model using training examples. It may be worth testing when a recurring behavior remains inconsistent after the team improves the prompt and validation, and the team can supply representative examples and keep a separate evaluation set. For this service, the target behavior might be selecting a reason code from an approved list when the supporting case details are already supplied. A constrained output field and validator remain useful ways to enforce the accepted codes. Google Cloud guide to building generative AI applications
Repeat the tests after a policy update. Keep live policy data separately queryable even if a tuned model improves the way the output is structured. A captured example that once used the right return window can become obsolete as policy changes.
Choose the smallest approach that passes the workflow tests
For an illustrative evaluation, set aside 60 cases with clear policy answers, 20 that require clarification, and 20 where no applicable policy exists. Give each candidate the same cases. Record policy correctness on the first group and correct clarification or handoff on the other groups. Audit which sources were retrieved and log response time for each route.
Suppose a retrieval prototype answers 56 of 60 clear cases correctly but guesses on two of the cases with no applicable policy. If the team’s acceptance rule requires all 20 unsupported cases to hand off, the extra correct answers alone cannot justify widening use. Route known product-and-region queries through the direct lookup, improve the missing-source behavior for the other requests, and reevaluate. Revisit fine-tuning only if the remaining failures show a stable behavior gap the team can label and measure.