Статья ещё не опубликована на языке Russian. Показана версия на English.
Evaluating RAG Answers: Faithfulness, Groundedness, and Answer Relevancy (RAGAS)
Опубликовано
2 мин на чтение
High retrieval recall does not guarantee a truthful answer. An LLM can ignore retrieved constraints, blend training-data assumptions into company policies, or dodge the user's question with generic filler. End-to-end RAG evaluation separates groundedness from usefulness.
The RAG Evaluation Triad
| Dimension | Core Question | Failure Example |
|---|---|---|
| Context Precision | Are the retrieved passages actually useful and ranked high? | Relevant pricing paragraph sits at rank 7 behind 6 unrelated chunks |
| Faithfulness (Groundedness) | Is every factual claim in the answer supported by retrieved context? | Answer promises "30-day free returns" when the policy states "14 days" |
| Answer Relevancy | Does the answer directly address what the user asked? | Factually true paragraph about shipping when the user asked about warranty |
| Abstention Accuracy | Does the model refuse cleanly when evidence is missing? | Fabricates a phone number instead of escalating to a human |
Claim-Level Faithfulness Verification
Rather than asking a judge model "rate this answer 1 to 5" (which produces noisy, uncalibrated scores), decompose faithfulness into atomic claim verification:
- Extract every factual claim made in the assistant's response.
- For each claim, check whether it is supported, contradicted, or not mentioned in the retrieved context.
- Compute
faithfulness = supported_claims / total_claimsand fail CI immediately on any contradicted claim.
json
{
"claims": [
{
"statement": "Refunds are processed within 5 business days.",
"verdict": "supported",
"evidenceSourceId": "src-2"
},
{
"statement": "Express shipping fees are refunded automatically.",
"verdict": "contradicted",
"evidenceSourceId": "src-2"
}
],
"faithfulnessScore": 0.5,
"hasContradiction": true
}
Avoiding Judge Bias in Automated Evals
- Never use the exact same prompt and model family uncalibrated without checking agreement against human labels on a 30-example calibration slice.
- Pin judge model versions and temperature
0so weekly trend lines reflect real pipeline changes rather than model drift. - Track tail failures alongside averages: an average faithfulness of 0.96 can still hide a 4 percent rate of critical pricing or policy contradictions.
Next: keep the underlying knowledge base fresh without burning embedding budgets in Incremental Knowledge Indexing.
Было ли это полезно?