LISTEN TO THIS ARTICLE

Start with a question your system gets wrong. Did it miss the relevant document, overlook evidence already in its prompt, or fail to apply the required format? These failures need different repairs.

Retrieval-augmented generation supplies selected evidence at inference time. Long-context prompting supplies a larger body of material directly. Fine-tuning changes model behaviour through training examples. They can be combined, but each addition should earn its place in a measured evaluation.

There is no universal corpus-size boundary or architecture winner.

When retrieval is worth testing

Retrieval is a useful candidate when requests need different subsets of a changing document collection. It lets the application search for material, attach source identifiers and pass selected passages to the model.

The retrieval pipeline is itself a possible source of failure. A relevant passage may never reach the generator because of document parsing, chunk boundaries, filters, query wording or ranking. Log the retrieved evidence separately from the answer so you can distinguish these problems.

Anthropic's contextual retrieval explanation describes how isolated chunks can lose important context and proposes adding explanatory context before indexing. Treat that as a technique to test, not a reason to rebuild a retriever that already meets your requirements.

Freshness is an operational property. Updating a source document does not instantly update every index, cache and answer. Test the time from an approved source change to a correct answer, including deletion and access revocation.

Fix the failure you can observe before adding another part to the system.

Fix the failure you can observe before adding another part to the system.

When longer context is worth testing

If the documents needed for a task fit within the selected model's supported input budget, passing them directly can be a useful baseline. It avoids a retrieval stage that might discard necessary evidence.

Fitting is not the same as answering correctly. Test whether the model can locate facts, reconcile conflicting passages and cite the right version. Put decisive evidence in different positions rather than always at the beginning. Include enough surrounding material to resemble actual usage.

Check the chosen endpoint's current context limits, output allowance, pricing and rate limits. Do not assume a provider's largest advertised window applies to every model or account. Budget for instructions, tool definitions and generated output as required by that endpoint.

Measure the full request under cold and warm cache conditions. A short demonstration cannot tell you what a busy service will cost or how quickly it will respond. Longer input, retrieval latency, output generation and queueing all belong in the comparison.

When fine-tuning is worth testing

Fine-tuning is a candidate when repeated examples can teach a stable behaviour: applying a classification scheme, following a house style or producing an expected response pattern. OpenAI's supervised fine-tuning guide describes example-based training and checking the result against evaluations.

It can also change factual recall, so saying that fine-tuning cannot teach facts is inaccurate. However, a trained model is not a document store with straightforward citation, deletion and update semantics. For changing, attributable knowledge, test supplying current evidence at inference time.

Establish a prompt baseline first. Keep a held-out evaluation set and compare against it after training. Include examples outside the narrow target pattern to catch regressions. Do not make a fixed number of examples or a hardware price into a universal starting requirement.

Output formatting also needs application validation. Training alone does not guarantee a valid schema, correct citation or safe action. Validate the result before a downstream system relies on it.

The best baseline is the simplest one that passes your real questions.

Use a workload test matrix

The following is a proposed experiment, not reported benchmark performance. Run each viable approach against the same questions and source versions.

Workload Test material Acceptance criterion
Exact lookup Answer present alongside similar but incorrect passages Correct answer and supporting source
Cross-document comparison Facts distributed across documents All required facts reconciled without invented links
Freshness A superseded policy and its replacement Current version used; old version identified if relevant
Missing evidence A plausible question with no answer in the permitted corpus Clear abstention or request for evidence
Permissions Relevant material outside the user's allowed sources No unauthorised material disclosed
Format Valid and deliberately awkward inputs Output passes the application's validation
Load Representative short and long requests arriving together Quality and latency remain within your agreed budget

For retrieval, record whether the evidence was retrieved and whether the final answer used it correctly. For long context, record the supplied documents and their order. For fine-tuning, record the base model, training dataset version and prompt. This makes a failed answer diagnosable.

Compare cost without hiding work

Include preprocessing, indexing, storage, training, generation, retries and review where applicable. Separate one-off preparation from recurring costs, and state the period over which you allocate preparation costs.

Use total cost divided by accepted tasks alongside task success and completion latency. A cheap answer that needs correction is not equivalent to an accepted answer. Our cost accounting guide provides a runnable example.

OpenAI's latency guidance identifies multiple contributors, including generation, input processing and request structure. Measure your whole application rather than borrowing a timing from a different model and workload.

Add a hybrid only for a demonstrated gap

A retrieval system can pass larger sections into a long context. A fine-tuned model can consume retrieved evidence. A router can select different paths. These are design options, not automatic upgrades.

Introduce one change at a time and keep the previous route available for comparison. A router adds its own mistakes and running cost; test misrouting as well as ideal assignments.

The best baseline is the simplest one that passes your real questions.

Save a decision record with the test set, source versions, acceptance criteria, costs and observed failures. Keep the chosen approach while it meets those requirements. Reassess when the corpus, permissions, model or workload changes. The memory and context hub and evaluation checklist provide the next steps.

Source trail