RAG-017RAG · Citationslayaeval.CitationRelevance
Citation Relevance
Is the cited source really about this claim?
Simulation state:
When it passes
Source fits the claim.
Threshold satisfied: evaluation score >= 3.0.
When it fails
Source is about something else.
Violation detected: execution flagged for human review or fallback routing.
SDK Specification
| Parameter | Value | Description |
|---|---|---|
| Class | CitationRelevance | Python evaluator class in layaeval |
| Required Fields | "claim", "citation", "source_text" | Arguments expected in the call signature |
| Default Threshold | >= 3.0 | Passes when quality score is at or above this value |
| Category | RAG Evaluation | Citations (Do the little [1] tags point to the right place?) |
Python Example
citation-relevance.py
1from layaeval import CitationRelevance23metric = CitationRelevance(threshold=3.0) # passes at or above 3.045res = metric(6 claim="Paris is the capital of France.",7 citation="[1]",8 source_text="Paris is the capital of France.",9)1011print(res.passed, res.value, res.confidence)
Related RAG Checks