Check Whether an LLM Answer Is Supported by Its Sources
For people building agents, RAG systems, or LLM workflows who need to check that a generated answer is truly grounded in the documents provided, without manually reading every output.
The prompt makes the model break the answer into claims, look for the evidence for each one in the material, classify it as supported, partial, unsupported, or contradicted, and return everything as valid JSON, with a verbatim quote of the excerpt and a suggested correction. Nothing is validated with outside knowledge.
Fill in the question, answer, and material fields, adjust the strictness if needed, and use the output to block, review, or rewrite answers before they reach the end user. It works well with Gemini and is easy to integrate into automated pipelines.
You are a Prompt Engineer specializing in LLM evaluation and hallucination detection in document-based systems. ## Objective Verify, claim by claim, whether the [MODEL_ANSWER] is supported exclusively by the [REFERENCE_MATERIAL], without using outside knowledge. ## Steps 1. Split the answer into verifiable claims, one idea per item 2. For each one, look in the material for the excerpt that supports or contradicts it 3. Classify: SUPPORTED, PARTIAL...