Model selection
Should Every Stage of an AI Assistant Use the Same Model?
Choose models stage by stage and run a controlled experiment across latency, model usage and answer quality before changing production.
Start with the job each stage has to do
An assistant that answers field-service questions might use one call to turn a follow-up into a search query, another to classify an input against policy, and a final call to explain an approved procedure. Each call has a different definition of success. An upgrade that makes answers more readable can have little effect on whether the search stage preserves part numbers or the policy stage catches a rare violation.
A single well-tested model is a sensible baseline. Multiple model or provider configurations introduce compatibility checks, quotas, failure modes and more behaviour to monitor. Change a stage when the measured benefit justifies that complexity.
Give each stage its own acceptance criteria
Check provider capabilities before substituting a model. Context limits, supported output formats, tool calls, streaming and error behaviour can differ. Price alone is a poor substitute for compatibility and an evaluation on your own cases.
- Query rewriting Check whether identifiers, versions and user corrections survive the rewrite. Score the downstream retrieval hit rate as well as rewrite quality. A short, valid search query is useful only if it retrieves the right passage.
- Moderation Measure false negatives by policy category and false positives on ordinary work requests. Rare high-impact errors can disappear in an overall accuracy average. Use labelled cases to determine whether the candidate meets your policy requirements.
- Generation Have reviewers score whether the answer is correct, supported by the retrieved passages and useful when evidence is incomplete. Include conflicting documents and cases where the right answer is a clarification.
- Embeddings Treat embedding selection as a retrieval experiment. Check index and query-vector compatibility if the embedding model changes. Keep embeddings fixed while testing a rewrite or generation model so you can attribute the effect.
Pick the first change from an error you can observe
In one example, an assistant gets the first answer right and loses a serial number when it rewrites the follow-up. Review the original turn, the rewrite and the retrieved passages together. If the rewritten query drops the identifier, a rewrite-model experiment is well scoped. If it preserves the identifier and the correct document still fails to appear, diagnose the retrieval configuration or the index first.
In another example, the answer cites a general maintenance procedure after retrieving a current service bulletin that overrides it. Before swapping the generation model, check which passages actually made it into the final context. If both passages were provided, test whether a new generator handles the conflict correctly and whether the prompt makes the precedence rule explicit. If the bulletin was removed to fit a context budget, a different generator may never see it.
Compare moderation separately. Imagine a classifier becomes more conservative and starts blocking ordinary phrases such as “isolate the inverter before inspection”. Review these operational false positives alongside cases the policy must catch. Label borderline examples with the policy owner and document how disagreements were resolved. These examples exercise different stages, which is exactly why one overall answer score can conceal a regression.
Replay the same turns through two configurations
Consider replacing only the rewrite model. Start with a representative set of sanitised conversations that covers simple turns, long histories, corrections, ambiguous references and policy-sensitive cases. Give each case an expected outcome and, where possible, an authorised passage that supports it. Keep a separate set for final validation.
Use the current production configuration as A. In B, replace only the rewrite model and keep settings, the index, permissions, prompts and generation model fixed where they are compatible. If a provider requires a prompt or output-format change, record that the two runs compare configurations. Replay the same inputs under comparable load and cache conditions. Use read-only or stubbed skills so the experiment has no production side effects.
Read a paired result without hiding the trade-off
Suppose you replay 200 labelled conversations with an answerable follow-up. These figures are illustrative. The baseline retrieves supporting evidence for 150 of them and the candidate for 148. The totals look close, but the paired review shows the candidate fixed four cases and broke six. All six were follow-ups that included a corrected part number. A quality criterion for identifiers would catch that failure even if the average looked acceptable.
Suppose the rewrite’s median duration drops from 350 to 220 milliseconds while the full pipeline’s median drops from 1.60 to 1.52 seconds. Report both results. The measurements show a 130-millisecond improvement at one stage and an 80-millisecond improvement end to end. Medians across stages are not additive, and the fastest stages need not occur on the same requests. Record sample sizes and also inspect slower requests, retries and provider timeouts.
For cost, include all calls required to complete the same turn, with input and output usage priced separately where applicable. A less expensive rewrite can still produce long queries or ambiguous results that increase downstream work. Track cost per evaluated turn and the fraction of successful outcomes together. If a provider does not report usage for a class of calls, label the estimate as incomplete rather than giving it false precision.
When reviewing a proposed moderation change, count policy violations and permitted requests separately. For example, if only twelve of the 200 conversations contain a violation, one additional miss changes the false-negative rate for that subset substantially, even though it changes overall accuracy by only half a percentage point. Include examples from each material policy category and report the denominators. The more consequential and less frequent a failure is, the more important it is to test deliberately for that failure before accepting a lower-cost model.
Decide what earns a rollout before you run the test
Agree on minimum acceptable retrieval and answer quality, policy-critical checks, and the latency or cost improvement you would consider worthwhile. Compare cases in pairs as well as in aggregate. If a cheaper model drops the hardware revision on several cases, a modest speed improvement may be a poor trade. A small replay set can reveal regressions. Expand coverage before drawing conclusions about rare failures or tail latency.
- Quality Compare passage retrieval, answer evidence and correct clarifications. Review failures by case type and independently inspect disagreements.
- Latency Compare stage duration and end-to-end p50 and p95, with sample sizes. Queueing, retries and downstream changes can erase a stage-level improvement.
- Usage and cost Record provider, model, calls, input and output usage where available, and retries. Estimate per-turn cost from the applicable rates and record what is missing.
- Rollout decision If the candidate meets the agreed criteria, canary it on a limited cohort with rollback available. Monitor the same measures and include real-world outcomes the offline set could miss.
Canary the configuration you actually evaluated
If the candidate meets your criteria, start with a small, observable group. Record the effective provider, model version, stage configuration and evaluation set version. Confirm that production and replay use equivalent prompts and permissions. A difference in model parameters, indexing or context selection can undo the value of the controlled comparison.
Exercise provider failure before rollout. Give each stage an explicit failure behaviour and a time budget. For example, if a rewrite times out, a self-contained request may be eligible for a search using the original wording, while a pronoun-only follow-up may need clarification. A fallback for a policy-critical moderation check should be designed and tested against that policy. Verify the failure paths with simulated responses so tests do not depend on inducing a live outage.
During the canary, track evidence support and policy errors alongside speed and usage. Review a sample of failures with a human rubric and keep the baseline available as a rollback target. If the change passes on short questions but fails in conversations with corrections, fix and retest that slice before expanding. The goal is a configuration that holds up across the work people actually do.
Sometimes the outcome is to retain a single model. If the candidate improves cost only for simple questions but needs retries for longer histories, introducing a second configuration may add an operational burden the team cannot justify. Record the results and revisit when you have a better candidate or a clear change in workload. The replay cases and rubrics are still valuable. They give future model or prompt changes a repeatable way to prove that gains on one stage carry through to the full assistant.
Where Cortex IR fits
Cortex IR supports choosing models and providers by stage across configured integrations, with embedding configuration handled separately. Its operational analytics can help teams review response times, outcomes, moderation decisions and reported model usage. Pair these operational signals with your own labelled quality evaluation and provider pricing. The experiment above is a process a team can run with those inputs.