Template id: rag-grounding-check
| Key | Type | Check | Judge tier |
|---|---|---|---|
cites_sources | must_have | regex_match@1 | None |
grounded_in_references | scored | llm_judge@1 | 2 |
no_fabricated_facts | must_not | llm_judge@1 | 2 |
answers_the_question | scored | llm_judge@1 | 1 |
{
"name": "rag-grounding-check",
"criteria": [
{
"key": "cites_sources",
"type": "must_have",
"primitive": "regex_match@1",
"config": {
"pattern": "\\[[0-9]{1,3}\\]"
}
},
{
"key": "grounded_in_references",
"type": "scored",
"primitive": "llm_judge@1",
"judge_tier": 2,
"weight": 3,
"config": {
"required_trust_tier": "reference-backed",
"instruction": "Every factual claim in the answer must be supported by the provided reference passages. Score the fraction of claims that are grounded."
}
},
{
"key": "no_fabricated_facts",
"type": "must_not",
"primitive": "llm_judge@1",
"judge_tier": 2,
"config": {
"instruction": "The forbidden condition: the answer states a specific fact (number, date, name, quote) that appears in NO reference passage."
}
},
{
"key": "answers_the_question",
"type": "scored",
"primitive": "llm_judge@1",
"judge_tier": 1,
"weight": 1,
"config": {
"instruction": "The answer addresses the user question directly rather than a different question."
}
}
]
}Send this JSON as the body of POST /v1/rubrics. The API also serves starters from GET /v1/rubrics/templates.
**Judges:** whether a RAG answer is grounded in its retrieved passages — citations present, every claim supported, nothing fabricated, and the actual question answered. **Use when:** you ship a RAG assistant and a wrong-but-confident answer costs you trust (support bots, doc Q&A, research copilots). Send the answer as `output` and the retrieved passages as `context` (Contract 05 roles); `reference_set_id` and inline references still work too.
Save the Rubric JSON shown above as rubric.json.
curl -s -X POST $API/v1/rubrics -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d @rubric.json
# typed roles: the answer is the output; the retrieved passages travel as context
curl -s -X POST $API/v1/verify -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d '{"rubric_id":"<id>","submission":{"output":"The refund window is 30 days [1].","context":[{"label":"policy-1","value":"Refunds are accepted within 30 days of delivery."}]},"options":{"wait_ms":45000}}'MCP: `rubric_compile` with this rubric.json, then `verify_submit { rubric_id, submission: { output, context: [...] } }`. The legacy `submission.inline` shape still works unchanged.