vectory
Back to field notes

Vectory field note

Evaluate citation accuracy as its own RAG layer

Score whether each cited passage supports the sentence attached to it, keep that separate from faithfulness and retrieval recall, and split the checks that need no labels from the ones that need review.

October 202611 min read

Key ideas

  • Citation correctness is a third layer the standard metric sets do not measure: faithfulness asks whether a claim is supported somewhere in the retrieved context, while citation correctness asks whether the specific passage under the sentence supports that sentence.
  • The structural and reference-free half of citation evaluation ships on unlabeled production traffic — marker resolution, link validity, and a judge scoped to one sentence and one cited passage — but it can never tell you the right passage was never retrieved.
  • Labels buy exactly one thing you cannot get otherwise: recall against a labeled supporting-passage set, which is why the gold set must name chunk IDs rather than only a gold answer string.

Workflow

01

Log a chunk ID per sentence

02

Ship the unlabeled checks

03

Label supporting passages

04

Validate the judge, then gate

01

Three scores, not one RAG quality number

An eval suite can report strong faithfulness and strong contextual recall while the footnote under a sentence points at the wrong passage, because neither metric reads the sentence-to-passage mapping your users click. DeepEval's RAG guide frames five core metrics — contextual precision, contextual recall and contextual relevancy on the retriever side, answer relevancy and faithfulness on the generator side — as component-level coverage, concedes that the metrics are extremely generic, and routes any criterion outside that set to GEval; no attribution metric appears in it.[2] Confident AI's breakdown is explicit that faithfulness checks the output for contradiction against the retrieval context rather than checking whether the output cites that context.[3]

Braintrust's survey of RAG evaluation tooling describes the same industry split, retrieval quality on one side and generation accuracy on the other, with the nearest attribution concept in its roundup being Galileo's Chunk Attribution scorer, which asks whether retrieved chunks grounded the answer at all.[7] That is a whole-answer question, not a per-sentence one. Faithfulness judged over the context as a single blob can pass on an answer whose every claim is supported somewhere while each inline marker points at the wrong chunk, which is precisely the failure a reader reports as a broken citation.

So define three scores and keep them apart. Retrieval quality asks whether the supporting passage was retrieved at all. Faithfulness asks whether the claim is supported somewhere in the retrieved context. Citation correctness asks whether the cited passage supports the sentence it is attached to. The survey 'Evaluation of Retrieval-Augmented Generation' frames retrieval and generation metrics jointly as relevance, accuracy and faithfulness, and identifies shortcomings in current benchmarks; passage-level attribution is one of the gaps that framing leaves open, so expect to build this layer rather than adopt it.[8]

  • Retrieval quality: was the passage that should support this sentence present in the context at all.
  • Faithfulness: is the claim contradicted by, or absent from, the retrieved context taken as a whole.
  • Citation correctness: does the cited passage support this specific sentence, scored per sentence and passage pair.
  • Three separate numbers in the dashboard, so a bad answer routes to a retrieval miss, a hallucination, or a mis-citation.
02

Log the cited chunk ID per sentence first

Citation correctness is not computable after the fact unless the trace records which chunk each sentence cited. No framework recovers that mapping from a question, a context list, and a finished answer, so the first change is to the trace schema rather than to the metric set: every generated sentence or claim carries the chunk ID it cites, and every cited chunk ID is resolvable back to the retrieval result that produced it. Teams that skip this end up re-deriving citations with a second model call, which measures that model's guess rather than the product's behavior.

Once the spans exist, the metric is a custom judge criterion rather than a built-in. DeepEval points at GEval for anything outside its built-in set rather than shipping an attribution metric, so treat citation correctness as a criterion you author, version, and validate yourself.[2] Braintrust's argument for splitting retrieval from generation applies directly to that authoring decision: one answer-level score cannot tell you which component failed, so a mis-citation needs its own scored dimension instead of a deduction from a blended quality figure.[7]

Keep the five component metrics as documented, because they still localise failures to the reranker, the embedding model, chunk size and top-K, the prompt template, and the generator.[2] The change is narrower than replacing them: stop treating faithfulness as a proxy for attribution, and report citation correctness beside it.

  • A chunk ID on every sentence or claim that renders a citation marker, written at generation time.
  • The retrieval result per trace with ranks, so a cited chunk can be checked for presence and position.
  • A stable chunk identity that survives re-indexing, or a recorded chunking version per trace.
  • Citation correctness stored as its own field, never folded into the faithfulness score.
03

The citation checks that run without any labels

A meaningful slice of this work needs no annotated set and can start on live traffic. Evidently's guide lists link presence — whether the answer includes a link to the source and whether that link is valid — as a programmatic check that needs no labels, alongside reference-free faithfulness implemented as an LLM judge over question, context and answer returning a faithful or not-faithful verdict with an explanation, and it names faithfulness specifically as a production-monitoring metric because it requires no ground truth.[1] DeepEval designates answer relevancy, faithfulness and contextual relevancy a referenceless trio that permits end-to-end evaluation without a labeled expected output.[2]

LangSmith's RAG tutorial makes the division concrete at the evaluator level: of its four evaluators, only correctness consumes reference outputs, while relevance, groundedness and retrieval_relevance derive everything from the run's own inputs and outputs.[4] That is the line to draw in your own suite. Evidently also documents LLM-judged retrieval relevance scored per chunk or over the whole context with a valid or invalid verdict, and cites a Microsoft result of GPT-4 reaching near-human performance on chunk-level relevance in Bing's RAG system, which is the published basis for trusting a per-chunk judge at all.[1]

The citation-specific addition is a judge scoped to a single pair: one sentence, and only the passage that sentence cites, returning supports, partially supports, or does not support. Narrowing the input is what separates this from faithfulness over the whole context, because a judge that can see every retrieved chunk will find support somewhere and pass a mis-citation. Add deliberate hallucination probes next to it — Evidently recommends asking questions the system should not be able to answer, including missing, outdated, and false-premise questions, and verifying that it admits the gap instead of guessing and citing something.[1]

Then state the ceiling out loud, because it decides what the reviewed set is for. Without labels you cannot compute recall, as Evidently puts plainly, so these checks find mis-citations and unsupported claims but stay silent when the correct passage was never retrieved and no citation could have been right.[1]

  • Deterministic marker resolution: every citation marker maps to a real chunk ID present in that trace's retrieval context.
  • Link validity on every surfaced source link, as a programmatic check rather than a judge call.
  • A reference-free faithfulness judge over question, context and answer, returning a verdict plus a written explanation.
  • A citation-support judge scoped to one sentence and only its cited passage, with a small discrete verdict set.
  • Per-chunk context relevance, aggregated per query as a binary hit, a share of relevant chunks, or a mean score.
  • Unanswerable, outdated and false-premise probes, scored on whether the system admits the gap.
04

What a reviewed set buys, and what stays invisible without one

The documentation is consistent about where labels become mandatory. DeepEval states that contextual precision and contextual recall require an expected output, which acts as the ground truth for what information the retrieval context should contain, and Confident AI's breakdown names those same two as the only metrics that take an expected output in its code samples.[2][3] Confident AI also supplies the reason to keep recall paired with relevancy: without contextual recall, anyone can hit perfect contextual relevancy by retrieving as little information as possible.[3]

Patronus requires gold labels for context sufficiency and answer correctness, and defines sufficiency through attributable statements — statements in the gold reference answer that can be directly matched with a statement in the retrieved context — which is the closest published analogue to passage-level attribution scoring.[6] Evidently is blunt that recall is the payoff for doing the labeling work, that without a ground-truth set you cannot compute recall, and it documents the labeled retrieval metrics worth computing: precision@k, recall@k, hit rate, and NDCG@k, which rewards correct items appearing higher in the ranking.[1]

For citation work the label has to be a passage set, not a sentence of prose. Evidently specifies labeling the relevant documents per query as document IDs, chunk IDs, or links, and that form is what citation correctness is scored against, since the question is which passage should have been under the sentence.[1] Budget for re-labeling too: Evidently warns that changing chunk boundaries reshuffles everything already labeled, and citation-level labels are hit hardest because they are anchored to chunks.[1] Version the set and tie every reported accuracy number to a specific version, following Patronus's practice guidance.[6]

  • Labeled supporting passages per query, recorded as document or chunk IDs rather than only a gold answer string.
  • recall@k and hit rate, the checks that expose a passage that was never retrieved.
  • precision@k and NDCG@k for reranking and embedding changes, since rank position matters to which passage gets cited.
  • Contextual recall or attributable-statement counting, paired with relevancy so retrieving almost nothing cannot game the score.
  • A versioned gold set, with every published number tied to one version and a re-labeling plan for chunking changes.
05

Generate and filter the reviewed citation set

The Hugging Face cookbook documents a reusable generate-then-critique recipe that inverts the pipeline. It samples a chunk from the knowledge base, prompts a model for a factoid question answerable from that chunk, explicitly forbids the question from referencing the passage — no 'according to the passage' or 'context' phrasing — and stores the context, question, answer and source document per record.[5] For citation work, the sampled chunk ID is the gold supporting passage, so record it as a label rather than as provenance metadata.

The filtering step is what keeps the set usable. Three independent critic agents each score candidates from 1 to 5: groundedness, meaning whether the question can be answered unambiguously from the given context, from unanswerable at the bottom to clearly answerable at the top; relevance to the target audience; and stand-alone context independence, where any reference to 'the context' forces the lowest score. Rows scoring 4 or above on all three survive, and the cookbook's cost guidance is concrete: aim for more than 100 final samples and therefore generate over 200, because roughly half get filtered out.[5]

Evidently inverts the flow the same way and adds the review discipline around it: auto-generated examples must be reviewed before use, domain experts are worth pulling in for edge cases and fine-print scenarios, a few dozen to a few hundred examples suffices to compare versions, and regenerating the set between runs introduces noise that makes results unreliable.[1] Freeze the set for the duration of an experiment series and version it, so a metric movement reflects a system change rather than a dataset change.[6]

Deliberately include the cases where citations go wrong. Multi-source queries, where only part of the supporting evidence is retrieved, are where markers most often attach to a neighbouring chunk that looks topically right, and they rarely appear in questions generated one chunk at a time. Grow the set from production as well: fold in real user queries and the mis-citation failures your unlabeled checks already surfaced.

  • Sample a chunk, generate a question answerable strictly from it, and keep that chunk ID as the gold supporting passage.
  • Forbid passage-referencing phrasing in the generation prompt so questions read like real user queries.
  • Apply all three critique filters at once — groundedness, audience relevance, stand-alone independence — and keep only candidates clearing every one.
  • Generate roughly double your target volume, since a large share of candidates is filtered out.
  • Have humans review the survivors, with domain experts on edge cases and fine-print scenarios.
  • Add multi-source queries where only part of the evidence is retrieved, then freeze and version the set.
06

Rubric mechanics that stabilise a citation judge

Two independent sources converge on the same prompt mechanics for judges like this one. LangSmith's tutorial defines every grading schema with the explanation field declared before the boolean verdict, and states that the ordering matters because the order in which fields are defined is the order the model generates them, which forces reasoning before the verdict; it runs at temperature 0 with strict structured output, and tunes strictness per evaluator, with its retrieval-relevance grader lenient by design so that it flags only facts completely unrelated to the question.[4] The Hugging Face cookbook demands an evaluation rationale before the total rating for the same stated reason, that asking for reasoning first gives the model more tokens to think before committing to a score token, and argues for detailed per-level rubric descriptions because a vague scale produces outputs that will not be consistent enough between different examples; it normalises its 1 to 5 scores to a 0 to 1 range with (x-1)/4.[5]

Apply that to citation support with two deliberate choices. Prefer a small discrete verdict set — supports, partially supports, does not support — over a continuous score, because the discrete labels are what reviewers can agree on. And calibrate strictness per check rather than globally: a citation-support judge should be strict about the cited passage specifically, while a retrieval-relevance judge can stay lenient about peripheral chunks, which is exactly the asymmetry LangSmith's per-evaluator tuning describes.[4]

Validate the judge before you publish its number. Measure judge-versus-human agreement on the reviewed set and treat the judge as an instrument that itself needs calibration, not as the measurement of record. Patronus reports purpose-trained evaluators, Lynx for hallucination detection and Glider, returning pass or fail plus reasoning and claiming advantages in long-context cases, which makes them a reasonable second opinion on faithfulness while your own criterion handles attribution.[6]

Then watch the two failure modes that quietly corrupt averages. Patronus warns about framework-level problems including RAGAS statement-extraction failures and cost from unoptimised recursive LLM calls.[6] A claim- or statement-extraction step that fails on some inputs drops those examples from the denominator without saying so, and recursive judge calls over long contexts invite throttling, so log extraction failures as their own counted outcome rather than letting them disappear.

  • Rationale field declared before the verdict field, since field order is generation order.
  • Temperature pinned to 0 with strict structured output, so near-identical examples stop drifting.
  • Per-level rubric descriptions rather than a bare numeric scale, with a normalisation rule for aggregation.
  • A discrete verdict set for citation support, strict about the cited passage and nothing else.
  • Judge-versus-human agreement measured on the reviewed set before the metric is published.
  • Extraction failures counted as an explicit outcome, so dropped examples never vanish from the denominator.
07

Report citation correctness as its own gate

Publish the number separately. Citation correctness belongs in dashboards and release gates as its own figure rather than folded into an aggregate quality score, because the whole point of separating the layers is that each one routes to different work: a retrieval miss goes to embeddings, chunking and top-K, a faithfulness failure goes to grounding instructions and model configuration, and a mis-citation goes to how the generator attaches markers to sentences. Braintrust's case for splitting retrieval from generation is the same argument one level down — a single score cannot tell you which component failed.[7]

Keep the unlabeled and labeled halves visibly distinct in the report, since they answer different questions and have different cadences. Marker resolution, link validity, the scoped citation-support judge, and the unanswerable probes run continuously on production traffic with no ground truth.[1] The labeled half — recall@k, hit rate, NDCG@k and attributable-statement coverage — runs against the versioned reviewed set on release candidates, and it is the only place a never-retrieved supporting passage shows up at all.[1][6]

Finally, read the three numbers together when you debug. Evidently frames debugging as explicitly asking whether the system failed to retrieve the right documents or whether the model hallucinated with correct context in hand, and the survey's joint treatment of retrieval and generation metrics is the same instinct at benchmark scale.[1][8] Citation correctness is the third question in that sequence: the right passage was retrieved, the claim was supported, and the marker still pointed somewhere else.

  • Citation correctness reported as its own figure, never averaged into a blended quality score.
  • Unlabeled checks on continuous production traffic, labeled retrieval metrics on release candidates.
  • Every published citation number tied to a named gold-set version and a named judge version.
  • A debugging order that separates retrieval miss, unsupported claim, and mis-attached marker.

Use this checklist

Before you ship

Sources

Watch and read the original material

  1. Evidently AI, RAG evaluation (LLM evaluation guide)

    Source for link presence and validity as programmatic checks needing no labels, reference-free faithfulness as an LLM judge with a written explanation, per-chunk retrieval relevance with a valid or invalid verdict plus the cited Microsoft result on chunk-level relevance in Bing's RAG system, recall being uncomputable without ground truth, precision@k, recall@k, hit rate and NDCG@k, labeling passages as document or chunk IDs, and re-labeling after chunking changes. Read 19 October 2026.

  2. DeepEval, RAG evaluation guide

    Source for the five core RAG metrics as component-level coverage, the admission that they are extremely generic, the absence of an attribution metric and the routing of custom criteria to GEval, the referenceless trio of answer relevancy, faithfulness and contextual relevancy, contextual precision and recall requiring an expected output, and the mapping of metrics to the reranker, embedding model, chunk size and top-K, prompt template and generator. Read 19 October 2026.

  3. Confident AI, RAG evaluation metrics: answer relevancy, faithfulness and more

    Source for faithfulness checking contradiction against the retrieval context rather than whether the output cites it, contextual precision and recall being the only metrics taking an expected output in its code samples, and the warning that without contextual recall anyone can achieve perfect contextual relevancy by retrieving as little information as possible. Read 19 October 2026.

  4. LangSmith documentation, Evaluate a RAG application

    Source for four evaluators of which only correctness consumes reference outputs while relevance, groundedness and retrieval_relevance use the run's own inputs and outputs, the explanation field declared before the boolean verdict because field order is generation order, temperature 0 with strict structured output, and per-evaluator strictness tuning with a lenient retrieval-relevance grader that flags only facts completely unrelated to the question. Read 19 October 2026.

  5. Hugging Face Open-Source AI Cookbook, RAG evaluation

    Source for the generate-then-critique recipe that samples a chunk and prompts for a factoid question answerable from it while forbidding passage-referencing phrasing; three critic agents scoring groundedness, relevance and stand-alone independence from 1 to 5 with a threshold of 4 on all three; targeting more than 100 final samples by generating over 200 because roughly half are filtered; and rationale-before-rating ordering plus per-level rubrics. Read 19 October 2026.

  6. Patronus AI, RAG evaluation metrics

    Source for gold labels required for context sufficiency and answer correctness, sufficiency defined through attributable statements matched between a gold reference answer and the retrieved context, versioning the evaluation set so accuracy numbers are tied to a version, purpose-trained evaluators Lynx and Glider returning pass or fail plus reasoning, and framework failure modes including RAGAS statement-extraction and recursive-call cost. Read 19 October 2026.

  7. Braintrust, Best RAG evaluation tools

    Source for the industry split between retrieval quality and generation accuracy, Galileo's Chunk Attribution scorer as the nearest attribution concept in the roundup and its whole-answer framing, and the argument that one answer-level score cannot identify which component failed. Read 19 October 2026.

  8. Evaluation of Retrieval-Augmented Generation: A Survey (arXiv:2405.07437)

    Source for the joint framing of retrieval and generation metrics as relevance, accuracy and faithfulness, and for the identified shortcomings in current RAG evaluation benchmarks. Read 19 October 2026.

Evaluation guides

Go deeper on what to evaluate

Vectory uses essential cookies and optional analytics to improve the site. You can update choices any time in cookie preferences. Privacy Policy

Customize