# RAG Citation Debugger > Check a RAG answer's citations against the retrieved chunks: uncited claims, wrong sources, numbers. Paste a generated answer with citation markers ([1], [doc2], [^3], ^1, 【4】) and the retrieved chunks. Each sentence is mapped to the chunks it cites and checked for lexical support: uncited claims, citations to chunks that do not support the sentence, numbers that are not in the cited chunk, better-matching chunks, markers pointing to non-existent chunks, and retrieved chunks that were never used. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://ragcitationdebugger.usefulweb.site/ (interactive tool at https://ragcitationdebugger.usefulweb.site/tool) - JSON API: POST https://ragcitationdebugger.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://ragcitationdebugger.usefulweb.site/api/v1/tool) - OpenAPI: https://ragcitationdebugger.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://ragcitationdebugger.usefulweb.site/mcp - tool `rag_citation_debugger` ## Inputs - answer (textarea, required): Generated answer with citation markers - chunks (textarea, required): Retrieved chunks - JSON [{"id":"doc1","text":"…"}] or one chunk per block starting with [id] or id: … - supportThreshold (number): Support threshold - Share of the sentence's content words that must appear in a cited chunk. ## Method - Markers recognised: [1], [1, 3], [doc2], [^1], ^1, 【4】 and (source: x). Markers placed after the full stop are attached to the preceding sentence. Labels resolve to chunk ids exactly, then by trailing number (doc2 ↔ 2), then a bare number n to the n-th chunk. - Support = share of the sentence's content words (stop words removed, light stemming) found in the cited chunk; the best cited chunk counts. ≥ threshold → supported, ≥ half the threshold → weak support, below → unsupported citation. - Numbers in the sentence must appear in at least one cited chunk, otherwise number-mismatch. Sentences with ≥ 3 content words or a number but no marker are uncited claims. - If another chunk covers the sentence clearly better (≥ threshold and +0.2), it is suggested as the correct citation. Chunks never cited are unused, or relevant-but-uncited if they would support a sentence. - This is lexical overlap, not entailment: paraphrases can look unsupported and negations can look supported. Treat results as pointers for review.