RAG answer grader
Is the answer grounded in the retrieved source, and does it answer the question?
Grades a retrieval-augmented answer the way a careful reviewer would: every claim checked against the source, contradictions caught, refusals spotted, and coverage scored. Run it on every production answer or on a saved batch of traces.
Try it live
Real calls to Jev. Pick an example or paste your own.
Pick an example or paste your own input, then run it.
Under the hood
Every question and rule, in the open. Fork it to change any of them.
What it asks
Reads question, source and answer, then asks 5 questions in one call.
- Q1Grounded in the sourceYes / no
Is every factual claim in the
answersupported by thesource? (Rewording is fine. A claim the source doesn't state counts as unsupported, even if it happens to be true.) - Q2Answers the questionYes / no
Does the
answerdirectly answer thequestion? (A partial answer counts only if it addresses the main thing asked.) - Q3Contradicts the sourceYes / no
Does the
answercontradict anything thesourcesays? - Q4Refusal or non-answerYes / no
Is the
answera refusal, an apology, or a statement that it can't help? - Q5CoverageScore
How completely does the
answercover what thesourcesays about thequestion?- 0Misses the point
- 1Covers a little
- 2Covers the main point
- 3Covers everything relevant
How it decides
Rules run in code, top to bottom. The first one that matches gives the verdict.
- 1If Contradicts the source ≥ 0.6Fail
- 2If Grounded in the source < 0.4Fail
- 3If Refusal or non-answer ≥ 0.7Needs reviewreview
- 4If Answers the question < 0.5Needs reviewreview
- 5If Grounded in the source < 0.7Needs reviewreview
- 6If Coverage < 1.5 of 3Needs reviewreview
- ·DefaultPass
Call it from your code
Every template runs as-is with an API key, no setup: POST /api/v1/judges/rag-answer-grader/run.
curl -X POST https://tryevally.com/api/v1/judges/rag-answer-grader/run \ -H "Authorization: Bearer $EVALLY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": { "question": "When will my refund arrive?", "source": "Refunds are processed within 24 hours of approval. The money then arrives in 5-7 business days, depending on your bank.", "answer": "Your refund is processed within a day of approval and should reach your account in 5-7 business days, depending on your bank." }}'Seen in the wild
Community builds on Jev that use this pattern. Not affiliated with Evally.
More in AI output quality
- AI output quality
Hallucination detector
Catch invented numbers, names and claims before your users do, with the sentence quoted.
GroundedSuspectHallucinated4 questions - AI output quality
Citation checker
Does the cited passage actually support the claim it's attached to?
SupportedPartly supportedUnsupported+12 questions - AI output quality
Summary checker
Faithful, complete and free of added opinions: the three ways summaries go wrong.
Good summaryNeeds editsUnfaithful5 questions - AI output quality
Support reply grader
Check an AI support reply against the customer's message and your policy before it's sent.
Ready to sendEdit firstEscalate+15 questions - AI output quality
Claim vs evidence
Does the evidence support the claim, contradict it, or not settle it? With the sentence that decides.
SupportedNot settledContradicted3 questions