---
name: "rag-groundedness-hallucination-checker"
description: "Verify that generated answers are strictly grounded in retrieved reference context."
metadata:
  author: "Exploding Gradients"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "check rag hallucination"
  - "verify answer faithfulness"
  - "score groundedness ragas"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# RAG Groundedness & Faithfulness Checker

Evaluates RAG generation faithfulness using automated critic models (Ragas, TruLens): sentence-level entailment checks, citation verification, and detecting hallucinated claims.

## When to Invoke
Invoke this skill whenever you need to:
- check rag hallucination
- verify answer faithfulness
- score groundedness ragas

## Execution SOP & Rules
1. Decompose generated answers into atomic factual propositions.
2. Verify that each proposition is entailed by the retrieved context using natural language inference (NLI).
3. Calculate faithfulness score = (verified claims / total claims).
4. Reject or revise answers with faithfulness scores below 0.85.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
