PDF Citation Validator — Verify RAG Page References
Pricing
from $0.70 / 1,000 citation checkeds
PDF Citation Validator — Verify RAG Page References
Check stored RAG citation text against the original PDF. Get MATCH, WRONG_PAGE, AMBIGUOUS or NOT_FOUND verdicts with evidence, page counts and a SHA-256. No OCR or LLM.
Pricing
from $0.70 / 1,000 citation checkeds
Rating
0.0
(0)
Developer
林 吴
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
10 days ago
Last modified
Categories
Features
Share
Verify that stored RAG citation text actually appears on the PDF page it claims.
Use it when
- Audit a RAG index after ingestion or after replacing a PDF.
- Catch wrong-page citations with evidence excerpts.
- Quantify ambiguous or missing citations before shipping answers.
- Keep a SHA-256 and physical page count for each audited PDF.
Input → output: Original PDF + existing citation records → page verdicts and evidence.
Works with Apify Schedules, webhooks/API and the Apify MCP server (Claude, Cursor and other MCP clients).
Quick start
- Provide an authorized public HTTPS PDF URL, or PDF bytes in
pdfBase64(without a data URL prefix). Supply exactly one source. - Add
chunks: objects withtext, optionalid, and optionalpage. - Run and inspect dataset records and the
SUMMARYkey-value record. Review suggestions before changing your index.
page always means 1-based physical PDF page, including covers and blank pages. Printed page labels such as roman numerals are not mapped.
{"pdfUrl": "https://www.rfc-editor.org/rfc/rfc9457.pdf","chunks": [{"id": "intro", "page": 2, "text": "Problem Details for HTTP APIs"}]}
The example quotation may occur on several pages; AMBIGUOUS is a useful result, not a failure. Replace the quotation with your actual stored text.
Results
| Status | Meaning |
|---|---|
| MATCH | One exact normalized match, on the claimed page. |
| WRONG_PAGE | One exact normalized match, on a different physical page. |
| PAGE_FOUND | One exact normalized match; no original page was supplied. |
| AMBIGUOUS | Text matches multiple pages. No page correction is suggested. |
| NOT_FOUND | No exact single-page match. This does not prove the citation is fabricated. |
| OCR_REQUIRED | No match and a relevant page has no extracted text. It may be blank or image-only; OCR is not performed. |
Each row includes the chunk ID, claimed page, candidate pages, suggested page where unique, reason and normalized evidence excerpts. SUMMARY includes PDF SHA-256, physical page count, pages without extracted text, method and status counts. Candidate pages are capped at 50 per row; evidence excerpts at 10. Counts and truncation flags remain explicit.
Matching and limitations
Matching applies Unicode NFKC, line-ending dehyphenation, whitespace normalization and case folding, then requires an exact substring within one page. It does not use an LLM or fuzzy similarity score. Hyphen normalization can alter genuinely hyphenated text; inspect evidence.
Paraphrases, cross-page chunks, unusual PDF reading order, tables, OCR errors, different file versions and extraction differences may produce NOT_FOUND. Repeated headers or repeated quotations produce AMBIGUOUS. A text match does not establish that the answer is true or supported in context. Physical page counts preserve blank pages. No database writes, automatic fixes or OCR are performed.
Limits: one PDF per run; 20 MB; 300 pages; 1,000 citation records; 20–10,000 normalized characters per quotation. Encrypted PDFs are unsupported. Invalid input fails the run. Network downloads allow public HTTPS port 443 and validate redirect destinations; private/local/reserved addresses are rejected. For sensitive documents, assess your Apify storage and retention requirements before uploading; input and results are stored by Apify. Avoid secrets in URLs. Server content is parsed as data, never executed.
Pricing at launch
Developer fee: $0.001 per delivered citation verdict ($1 per 1,000 citations), with platform usage included. Apify paid plans receive volume discounts — Bronze 10%, Silver 20%, Gold and above 30%. All delivered verdicts are charged, including ambiguous or missing matches. Invalid input or unreadable PDFs generate no citation event charge. No separate developer start fee. Set a maximum charge; SDK limits dataset delivery to the remaining budget. SUMMARY counts describe all analyzed citations; dataset delivery can be smaller at the charge limit. No third-party API key or paid OCR service is required. Start with one small PDF, use 256 MB and a run spending limit; large or complex PDFs may need more memory. No measured cost or accuracy guarantee is implied.
Automation
Run through Apify API, schedules, n8n or Make. Retrieve the default dataset for per-citation results and key-value SUMMARY for totals. Branch on WRONG_PAGE for manual review; do not automatically modify or delete production records based on this output.
Validation
The included local tests cover known physical page offsets, preserved blank pages, repeated quotations, missing text, absent page metadata, invalid inputs and conservative rejection of paraphrases. Synthetic samples are generated for tests and are not customer data. Test success does not establish universal PDF extraction accuracy.
FAQ
Does it check whether a citation is true or supported? No. It verifies that the quoted text appears on the claimed physical PDF page. It does not judge truth or semantic entailment.
Does it use OCR? No. It works on extractable text. Pages without extracted text are reported as OCR_REQUIRED.
What are the limits? One PDF per run, 20 MB, 300 pages and 1,000 citation records. Encrypted PDFs are unsupported.
What does AMBIGUOUS mean? The same text appears on multiple pages, so no single page correction is suggested.
How much does it cost? $0.001 per delivered citation verdict. Invalid input or unreadable PDFs generate no citation charge.