Fetch URLs and verify that quoted text appears on the page. Extracted from proof-engine.
Project description
proof-citations
Fetch URLs and verify that quoted text appears on the page — the citation-verification primitive extracted from Proof Engine.
Install
pip install proof-citations
Library
from proof_citations import verify_citation
result = verify_citation(
"https://example.com/article",
"the exact quoted sentence",
"B1", # fact_id — used in messages
)
print(result["status"]) # "verified" | "partial" | "not_found" | "fetch_failed"
print(result["credibility"]["tier"])
CLI
proof-citations verify --url URL --quote "QUOTE TEXT" --fact-id B1
proof-citations verify --facts facts.json
Why
LLMs hallucinate citations. This package does one job: fetch the URL, normalize unicode and HTML, and confirm the quoted text is actually on the page. It handles PDFs, Wayback fallback, and the unicode quirks (en-dash vs hyphen, curly quotes, non-breaking spaces, HTML-entity-encoded quotes) that real citations contain.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proof_citations-1.33.2.tar.gz.
File metadata
- Download URL: proof_citations-1.33.2.tar.gz
- Upload date:
- Size: 34.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
080f275272ff326b982e7c989d1044e5f002aea812977907bc6d8448a447aa33
|
|
| MD5 |
04e8a4e2f2b5d8ef1c507d27593dfa7f
|
|
| BLAKE2b-256 |
9cdab85720d73619b18c0f6e7faf705c3c47c2aaf081715aee1479c554a9daa8
|
File details
Details for the file proof_citations-1.33.2-py3-none-any.whl.
File metadata
- Download URL: proof_citations-1.33.2-py3-none-any.whl
- Upload date:
- Size: 34.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fabd1bdbf96f9f40a0f8e2ce8e470cb308d01a9679f4183d148af753cd939c7e
|
|
| MD5 |
00baa96004d554fd5a5e12487f65634d
|
|
| BLAKE2b-256 |
07bd83e509a9e9aee2a7a504512ebc8775b61c3d961e3e21de0135d0c3e47c45
|