RAG prompt: check that an answer is supported by the sources
# RAG prompt: check that an answer is supported by the sources code: 1npskcg | type: prompt | language: en | licence: MIT | version: v1 description: Checks a draft answer sentence by sentence against the retrieved passages and flags unsupported claims, as JSON. page: https://contextetech.com/en/prompts/rag-groundedness-check-1npskcg mcp: connect https://contextetech.com/mcp then call load_resource with code "1npskcg" (or ask "load 1npskcg") json: https://contextetech.com/api/resources/contextetech--rag-groundedness-check python: pip install contexte && contexte get 1npskcg citation (required by the licence): contextetech. (2026). RAG prompt: check that an answer is supported by the sources (Version 1) [Prompt]. Contexte Tech. https://contextetech.com/en/prompts/rag-groundedness-check-1npskcg
Checks a draft answer sentence by sentence against the retrieved passages and flags unsupported claims, as JSON.
Template
You are a strict fact checker for a retrieval-augmented assistant.
Retrieved passages:
{{passages}}
Draft answer:
{{answer}}
Split the draft answer into sentences. For each sentence, decide:
- "supported": the passages state it,
- "partial": the passages state part of it,
- "unsupported": nothing in the passages states it.
Return JSON only:
{"sentences": [{"text": "...", "verdict": "supported|partial|unsupported", "evidence": "short quote or empty"}], "ok_to_send": true|false}
Set "ok_to_send" to false if any sentence is "unsupported".
Context: this check runs before the answer is shown to a customer, so false positives are better than false negatives.
Most important: only use the passages; do not invent evidence and do not use outside knowledge.
First, split the answer; then look for each claim in the passages; finally, double-check your verdicts.
If information is missing from the passages, mark the sentence "unsupported" and cite the sources you checked.
Neutral tone; evidence quotes of 20 words maximum; JSON keys in English.
Example: "The fee is 5 %" with a passage saying "a 5 % fee applies" is "supported".Variables
Notes
Use it after generation, before showing the answer: rewrite or drop the unsupported sentences.
- Identifier
- contextetech--rag-groundedness-check
- File
- rag-groundedness-check.json
- Format
- JSON (application/json)
- Size
- 1,517 bytes (1.5 KB)
- Encoding
- UTF-8
- Estimated tokens
- ≈ 421
- Commercial use
- Allowed
- Personal data
- None
- Version
- 1.0
- Published on
- October 18, 2026 at 8:00 AM
- Updated on
- October 18, 2026 at 8:00 AM
- Storage
- in database
Statistics
Likes : 0 · Comments : 0
Click a counter to show or hide it, hover the chart for details. One view per visitor per day, bots excluded; counting started on 30 September 2026.
Estimated cost
- Input tokens per call
- ≈ 454
| Model | Per call | Per month |
|---|---|---|
| GPT-6 Luna · OpenAIbest price | €0.00004 | €0.04 |
| DeepSeek Flash · DeepSeek | €0.00012 | €0.12 |
| Mistral Large · Mistral AI | €0.00020 | €0.20 |
| DeepSeek V4 Pro · DeepSeek | €0.00053 | €0.53 |
| GPT-6 Sol · OpenAI | €0.00080 | €0.80 |
| Claude Sonnet 5.5 · Anthropic | €0.00080 | €0.80 |
| Claude Opus 5.5 · Anthropic | €0.00160 | €1.60 |
| Self-hosted open-source model (Ollama, vLLM) | €0 in API fees (server cost only) | |
Input cost only, excluding the model's answer. Providers' public standard prices (Mistral AI, DeepSeek, OpenAI, Anthropic) converted from USD to euros at the ECB rate of October 13, 2026. Estimate: 1 token ≈ 3.6 characters.
Common to all 3 regions
Created by the author, no outside source.
Commercial use allowed · credit the author · changes allowed.
Text or data only: no access to files, network or commands.
Hosted in France (Scaleway, Paris). No transfer outside the EU.
European Union · 5/5
No personal data.
No training data: no summary required.
United States · 5/5
No personal data.
No training data: no documentation to publish.
China · 5/5
No personal data.
No training data; AI-generated content published in China must be labelled (2025).
Indicative summary as of 30/09/2026, not a legal certification. Method and sources →
Prompt relevance
The detailed criteria are for members.
Every criterion, the points removed and a tip to fix each one.
The detailed criteria are for members.
Every criterion, the points removed and a tip to fix each one.
Checks
MCP contexte
https://contextetech.com/mcp
load 1npskcg
Add the URL as a connector in your AI apps' settings, then send the request above.
Python contexte
import contexte p = contexte.load("contextetech/rag-groundedness-check") print(p.fill(passages="…", answer="…"))
API
import json, urllib.request url = "https://contextetech.com/api/resources/contextetech--rag-groundedness-check" fiche = json.load(urllib.request.urlopen(url)) print(fiche["title"] or fiche["name"])
rag-groundedness-check.json
{
"format": "contextec/prompt/v1",
"id": "contextetech/rag-groundedness-check",
"description": "Checks a draft answer sentence by sentence against the retrieved passages and flags unsupported claims, as JSON.",
"license": "MIT",
"language": "en",
"template": "You are a strict fact checker for a retrieval-augmented assistant.\n\nRetrieved passages:\n{{passages}}\n\nDraft answer:\n{{answer}}\n\nSplit the draft answer into sentences. For each sentence, decide:\n- \"supported\": the passages state it,\n- \"partial\": the passages state part of it,\n- \"unsupported\": nothing in the passages states it.\n\nReturn JSON only:\n{\"sentences\": [{\"text\": \"...\", \"verdict\": \"supported|partial|unsupported\", \"evidence\": \"short quote or empty\"}], \"ok_to_send\": true|false}\n\nSet \"ok_to_send\" to false if any sentence is \"unsupported\".\n\nContext: this check runs before the answer is shown to a customer, so false positives are better than false negatives.\nMost important: only use the passages; do not invent evidence and do not use outside knowledge.\nFirst, split the answer; then look for each claim in the passages; finally, double-check your verdicts.\nIf information is missing from the passages, mark the sentence \"unsupported\" and cite the sources you checked.\nNeutral tone; evidence quotes of 20 words maximum; JSON keys in English.\nExample: \"The fee is 5 %\" with a passage saying \"a 5 % fee applies\" is \"supported\".",
"variables": [
"passages",
"answer"
]
}
Community
No comments yet. Share your feedback, it will help the next person.