Skip to content

Newark, Delaware

AI

AI model comparison for enterprise RAG: what to measure

A model benchmark does not show whether your assistant can find the right document, refuse unsupported questions and stay within cost limits.

September 28, 20267 min readStarlink Nexus AI Practice
AI model comparison for enterprise RAG: what to measure

Build the test set from real work

Before any AI model comparison, the foundation is the test set. Many teams are tempted to use synthetic or generic questions, but these rarely reflect the complexity of actual business queries. Instead, start by collecting real tickets or requests from your ticket queue—ideally those that have challenged your team or produced inconsistent results. Include a mix of routine, ambiguous, and edge-case queries. For example, gather tickets where users have asked for contradictory policy documents, or where similar questions led to different answers due to subtle context differences.

Define what constitutes an acceptable answer for each query. This means agreeing, in advance, on which documents are approved sources and what the boundaries of a correct response are. For requests that should be refused—such as those seeking access to confidential VLAN configs or data outside the allowed scope—specify that the correct behaviour is a refusal, not an invented or partial answer.

Avoid the mistake of only testing with clear-cut, unambiguous questions. Real-world usage includes requests that are vague or based on misunderstandings. Include these to see how the model handles uncertainty. After building the set, review with subject matter experts to ensure coverage. Good test sets reveal not only whether the model can answer, but also whether it knows when not to answer. This is especially vital for enterprise settings, where incorrect or speculative answers can have operational consequences.

Measure retrieval and answer quality separately

Retrieval-Augmented Generation (RAG) systems combine search with language generation. It is tempting to judge the system solely on the fluency or relevance of the final answer, but this masks underlying weaknesses. Always measure retrieval quality and answer quality as separate artefacts. For each test query, record which documents the system retrieved. Did it pull the correct VLAN config export, the right policy document, or a misleadingly similar but outdated file? A fluent answer based on the wrong document is a failure of retrieval, even if the language model generates a plausible response.

Track whether the response cites the correct source. For example, if the answer references a backup job but the evidence comes from a different system, flag this as a citation error. Also, check that the system produces no answer when evidence is missing. This is a common failure mode: some models will attempt to answer every question, even when the search returned nothing relevant. Such behaviour can lead to incorrect changes or missed alerts.

A good evaluation process will log retrieval artefacts for each query—such as the IDs of retrieved documents or the exact search terms used. Review these logs to spot patterns: are certain types of queries consistently retrieving the wrong artefact? Are refusals handled correctly, or does the model hallucinate answers when it should abstain? Avoid the pitfall of only scoring the final answer; without separate retrieval metrics, you cannot pinpoint where improvements are needed.

Test cost and latency

Enterprise deployments care about more than accuracy. Cost and latency are operational constraints that can make or break a RAG rollout. For each test run, record input tokens, output tokens, search time, and total end-to-end delay. Use both short and long questions to simulate real usage—simple queries about a single ticket, and more complex ones that require searching across multiple VLANs or backup jobs.

A common failure mode is selecting a model that is marginally more accurate but several times more expensive under realistic loads. For example, a model that handles long context windows may incur high token costs, especially if your document store includes large artefacts like config exports or full audit logs. Measure these costs explicitly. Do not rely on vendor estimates; run your own queries and record the actual resource usage.

Latency matters for user experience. Track the time from query submission to answer delivery, including search and generation. For some workflows, such as live incident response or change window approvals, even small delays can disrupt operations. Create alerts for latency thresholds that would impact your team’s workflow. After testing, compare models not just on absolute accuracy, but on the trade-off between speed, cost, and answer quality. Avoid the mistake of optimising for one metric in isolation.

Maintain versioned evaluation data

RAG systems evolve. Prompts are refined, retrieval algorithms are tuned, and the underlying document store changes as new artefacts—like updated VLAN configs or revised backup job schedules—are added. To ensure your model comparison remains valid, keep all evaluation data versioned. This includes the test set, the prompt templates, the retrieval logic, and the reference answers.

Each time you make a change—such as updating the retrieval method to handle a new type of ticket, or modifying the prompt to clarify refusal behaviour—rerun the entire test set. Store the results with a version tag that links back to the exact configuration and document corpus used. This allows you to track whether improvements are real, or simply the result of a test set drift.

A specific failure mode is evaluating a new model against an outdated test set, or mixing results from different prompt versions. This can produce misleading conclusions and mask regressions. Good practice is to keep a changelog for each artefact: when the ticket queue schema changes, or when a new VLAN is added to the test environment, record the update and its impact on test results. Avoid ad hoc testing; version control is as critical for evaluation as it is for code.

Human review of ambiguous and edge cases

Automated metrics are valuable, but enterprise RAG systems inevitably face ambiguous queries and edge cases that defy easy scoring. For these, a human review is essential. After running the test set, identify queries where the model’s behaviour is unclear or where the answer quality metric is borderline. These often include requests that reference conflicting documents, or tickets that require nuanced interpretation of policy.

Set up a review panel—ideally including both IT managers and subject matter experts familiar with your artefacts, such as VLAN configs or backup job policies. For each flagged case, examine the retrieved documents, the generated answer, and the cited sources. Did the model select the right artefact? Was the refusal justified? Were there signs of hallucination, such as invented alert thresholds or non-existent change windows?

Document the outcome of each review. For example, if the model answered a question about a deprecated backup job with current documentation, note this as a retrieval failure. If it refused a legitimate request due to ambiguous wording, flag this for prompt refinement. Avoid the mistake of relying solely on automated pass/fail metrics; human judgement is needed to interpret complex or novel queries. Good review processes improve both the model and the test set over time.

Handling document contradictions and ambiguity

Enterprise document stores are rarely clean. It is common to find contradictory artefacts—such as two policy documents with conflicting guidance, or multiple VLAN config exports that disagree on allowed subnets. Your test set should include queries that surface these contradictions. For example, ask the model to resolve a ticket where the change window in one document overlaps with a maintenance blackout in another.

Track how the model handles these situations. Does it arbitrarily select one source, or does it flag the contradiction? Good RAG systems will either refuse to answer or cite both sources, highlighting the conflict. A failure mode is silent acceptance of one artefact, leading to incorrect actions—such as scheduling a backup job during a prohibited window.

Ambiguity also arises from incomplete or outdated documents. For example, a ticket may request an alert threshold for a system that has recently changed. The model should either clarify what information is missing or refuse to answer, rather than guessing. Review the logs for queries where the model’s behaviour was uncertain. Avoid training or tuning the model to always produce an answer; in enterprise settings, silence or refusal is often the safer option.

Monitoring and alerting on RAG system failures

Once a RAG system is deployed, ongoing monitoring is required. Set up alerts for specific failure modes observed during testing. For example, create an alert if the system produces an answer without citing any document, or if it references a deprecated VLAN config. Monitor the frequency of refusals—both appropriate and inappropriate—using logs from the ticket queue.

Track performance over time, especially after changes to the document store or retrieval logic. For instance, if a new backup job schedule is added, verify that the system retrieves the updated artefact and not an outdated one. Configure alerts for latency spikes, such as search times exceeding your operational threshold during a change window.

A good monitoring setup includes dashboards showing retrieval accuracy, answer quality, cost, and latency for recent queries. Review these regularly to catch regressions or emerging issues. Avoid the mistake of treating model evaluation as a one-time event; ongoing monitoring is necessary to maintain trust in the system. When a failure is detected—such as a hallucinated alert threshold or an incorrect refusal—open a ticket for investigation and update the test set to include the new scenario.

Iterative improvement and feedback loops

No RAG system is perfect at first deployment. Establish a process for iterative improvement, using feedback from both automated metrics and human review. After each test cycle, update the test set with new artefacts—such as recently encountered tickets or novel failure cases. For example, if a user reports that the model misinterpreted a change window, add this scenario to the next round of testing.

Incorporate feedback from IT managers and end users. If the model’s refusals are too frequent, review the prompt and retrieval logic to reduce unnecessary abstentions. If hallucinations persist, refine the system to require explicit citation of artefacts for each answer. Track changes to the document store, such as new VLAN configs or retired backup jobs, and ensure the evaluation data reflects the current environment.

Avoid complacency. Even after initial deployment, new artefacts and policies will emerge, and the RAG system must adapt. Use versioned evaluation data and regular test cycles to maintain alignment with operational needs. A good process will surface issues before they impact production workflows, and ensure that the model continues to handle the full range of real-world queries from your ticket queue.

Topics

#AI

Starlink Nexus AI practice

If this reflects a problem you are dealing with, we can review your environment and tell you what we would change first - including if the answer is nothing.

Start a conversation

Next step

Let's scope it properly.

A 30-minute call is usually enough to tell whether we are the right fit. No pitch deck, no pressure.