Back to Research
Guardrails
February 6, 2026
8 min read

Context Adherence vs. Correctness: The Critical Distinction Your Evals Are Missing

DeepRails
DeepRails Research Team
DeepRails

Most RAG evaluation systems make a fatal error: they conflate grounding (does the response use the provided context?) with accuracy (is the response factually correct?). This conflation causes two catastrophic failure modes—blocking correct outputs that add helpful context, and passing incorrect outputs that are technically "grounded" in flawed source documents. This article establishes the critical distinction and provides a framework for measuring each independently.

The Core Problem

A response can be grounded but wrong (source document contains errors), or correct but ungrounded (model adds accurate information from pre-training). Treating these as the same metric means you can't diagnose which failure mode is occurring—and you'll apply the wrong fix.

Defining the Distinction

Context Adherence (Grounding)

Question: Can every claim in the response be traced back to specific passages in the provided context?

Passing example: Context says "Q3 revenue was $10M." Response says "The company earned $10M in Q3." ✓ Grounded

Failing example: Context says "Q3 revenue was $10M." Response says "The company earned $10M in Q3, continuing its strong growth trajectory." ✗ "Strong growth trajectory" not in context

Correctness (Factual Accuracy)

Question: Are the claims in the response verifiably true according to authoritative sources or world knowledge?

Passing example: Response says "The Eiffel Tower is in Paris." ✓ Factually correct (regardless of whether context mentioned it)

Failing example: Response says "The Eiffel Tower was completed in 1923." ✗ Factually wrong (actual: 1889)

The Four Quadrants

Responses fall into four categories based on these independent dimensions:

✓ Grounded + ✓ Correct

Ideal state. Response uses only provided context, and that context is accurate.

Example: Context says "Paris is the capital of France." Response says "Paris is the capital of France."

✗ Grounded + ✓ Correct

Helpful extrapolation. Response adds accurate information beyond context. May or may not be desirable depending on use case.

Example: Context says "Paris is the capital." Response says "Paris is the capital of France, known for the Eiffel Tower."

✓ Grounded + ✗ Correct

Source document error. Response faithfully reproduces incorrect information from context. Grounding is working; source quality is the problem.

Example: Context says "The Eiffel Tower was completed in 1923." Response repeats this error.

✗ Grounded + ✗ Correct

Hallucination. Response invents information not in context, and that information is wrong. Worst case.

Example: Context says "Paris is a city." Response says "Paris is the capital of Germany."

Why the Distinction Matters: Diagnostic Power

Measuring these dimensions separately tells you what's broken and how to fix it:

Failure PatternRoot CauseFix
Low grounding, high correctnessModel ignoring context, using pre-trainingStrengthen grounding instructions; reduce temperature
High grounding, low correctnessSource documents contain errorsImprove retrieval quality; add fact-checking layer
Low grounding, low correctnessModel hallucinating freelyAdd strict grounding guardrails; consider model change

Use Case: When to Prioritize Which Metric

Prioritize Context Adherence When:

  • Legal/compliance contexts: Responses must be defensible based on cited documents. Adding external information creates liability.
  • Customer support: Agents must follow official policies exactly. Helpful extrapolation can contradict company guidelines.
  • Research summarization: Users need to know what the paper actually said, not what the model thinks is true.

Prioritize Correctness When:

  • Medical/safety-critical: Wrong information is dangerous regardless of source. Verify against authoritative knowledge bases.
  • Educational content: Teaching incorrect information is worse than teaching incomplete information.
  • Fact-checking applications: The whole point is verifying truth, not source fidelity.

Require Both When:

  • Financial reporting: Must cite specific documents AND be factually accurate.
  • Regulated industries: Compliance requires both source traceability and factual correctness.
  • High-stakes decision support: Users need confidence that responses are both grounded and true.

Implementation: Measuring Each Dimension

Context Adherence Evaluation

  1. Extract claims from the response (atomic factual statements)
  2. Map each claim to specific passages in the context
  3. Score = (mapped claims) / (total claims)
  4. Flag unmapped claims for review or correction

Correctness Evaluation

  1. Extract claims from the response (same as above)
  2. Verify each claim against authoritative knowledge bases or fact-checking APIs
  3. Score = (verified claims) / (total claims)
  4. Flag false claims regardless of whether they appeared in context

DeepRails Measures Both Independently

DeepRails provides separate Context Adherence and Correctness metrics. You can configure workflows to require one, both, or neither depending on your use case. Our evaluation engine automatically handles claim extraction, mapping, and verification.

Common Pitfalls

  • Using a single "RAG quality" metric: This hides whether failures are grounding issues or source quality issues.
  • Penalizing helpful extrapolation: If your use case allows it, don't punish models for adding accurate context.
  • Ignoring source quality: High grounding scores mean nothing if your source documents are wrong.
  • Over-constraining grounding: Requiring 100% grounding can make responses robotic and unhelpful. Find the right threshold for your domain.

Conclusion

Context adherence and correctness are orthogonal dimensions of RAG quality. Measuring them separately provides diagnostic power that a single combined metric cannot. You'll know whether to fix your retrieval system, your source documents, or your grounding instructions.

The right balance depends on your use case. Legal applications demand strict grounding; educational applications demand strict correctness; regulated industries demand both. Define your requirements explicitly, measure each dimension independently, and optimize accordingly.

Share this article:
Guardrails

Need a Complete AI Team?

Get the AI expertise that shipped products for 500K+ users. Our managed services team builds, deploys, and maintains production AI systems that work. From Anthropic-grade safety infrastructure to full-stack implementations.

Starting at $5K/month

Fractional CTO/CAIO options available