Proof-Carrying Numbers (PCN) is a presentation-layer protocol that enforces numeric fidelity in LLM-generated content through mechanical verification. PCN ensures that numbers displayed to users are verified against source data, highlighting numeric hallucinations when they occur and establishing trust through proof.
Audience: This project is designed for developers, researchers, and organizations working with LLM-generated content where numeric accuracy is critical, including financial reporting, scientific data presentation, development data dissemination, and regulatory compliance applications.
Large Language Models (LLMs) are stochastic systems that may generate numbers that deviate from available data—a failure known as numeric hallucination. Existing safeguards like retrieval-augmented generation, citations, and uncertainty estimation improve transparency but cannot guarantee fidelity: fabricated or misquoted values may still be displayed as if correct.
PCN enforces numeric fidelity by placing verification in the renderer, not the model. Under PCN:
- Claim-bound tokens: Numeric spans are emitted as tokens tied to structured claims
- Policy-based verification: A verifier checks each token under a declared policy (e.g., exact equality, rounding, aliases, or tolerance with qualifiers)
- Fail-closed behavior: Only claim-checked numbers are marked as verified; all others default to unverified
- Spoofing prevention: The separation of verification from generation prevents models from marking numbers as verified
✅ Model-agnostic: Works with any LLM or text generation system
✅ Lightweight: Minimal overhead, integrates seamlessly into existing applications
✅ Formally verified: Proven soundness, completeness, fail-closed behavior, and monotonicity
✅ Extensible: Can be extended with cryptographic commitments
✅ Policy-flexible: Supports various verification policies (exact match, rounding, tolerance, aliases)
Trust is earned only by proof — the absence of a verification mark communicates uncertainty.
This monorepo contains the PCN ecosystem:
-
TypeScript packages (
packages/*) — Published to npm under@pcn-js/*@pcn-js/core— Core PCN implementation@pcn-js/data360— Data360 preset: Data360ClaimsProvider + extractor for get_data (claim_id/OBS_VALUE/REF_AREA/TIME_PERIOD)@pcn-js/fixtures— Shared test fixtures@pcn-js/ui— React UI components for verified/pending claims
-
Python packages (
python/*) — Published to PyPI underpcn-*pcn-core— Core PCN implementation for Pythonpcn-fixtures— Shared test fixtures for Python
-
Specifications (
specs/*) — Source of truth across languages- Policy schema definitions
- Shared test fixtures
-
Examples (
examples/*) — Sample apps using PCNchat-app— Vite + React demo: Data360ClaimsProvider + ClaimMark (Data360 preset)
-
Documentation (
docs/*) — Intended for GitBook sync
# Enable corepack (for pnpm)
corepack enable
# Install dependencies
pnpm install
# Run tests
pnpm -r test
# Run the example app (after install)
pnpm --filter pcn-example-chat-app dev
# Then open http://localhost:5173
# Build all packages
pnpm -r build# Install development dependencies
python -m pip install -e "python/pcn-core[dev]"
# Run tests
pytest -q python/pcn-corePCN is designed for numerically sensitive settings where accuracy matters:
- Trustworthiness in AI dissemination of development data
- Financial reporting and analysis
- Scientific data presentation
- Medical statistics and research
- Legal and regulatory compliance
- Educational content with quantitative claims
Comprehensive documentation is available:
- Documentation — Detailed guides and reference materials
- Integrating PCN in your app — Integration paths (Data360 vs custom), dependencies, and what your app must provide
- Publishing to npm — How to publish
@pcn-js/*so apps can install from npm - Policy Reference — Understanding PCN verification policies
- Contributing Guide — How to contribute to PCN
- Code of Conduct — Community guidelines
Note: For web-based documentation accessible to non-technical audiences, see the documentation website (when available).
For questions, issues, or contributions, please contact:
- Project Maintainers: avsolatorio@gmail.com
Alternatively, you can:
- Open an issue on GitHub Issues
- Start a discussion on GitHub Discussions
This project is licensed under the MIT License together with the World Bank IGO Rider. The Rider is purely procedural: it reserves all privileges and immunities enjoyed by the World Bank, without adding restrictions to the MIT permissions. Please review both files before using, distributing or contributing.
See LICENSE for the full license text.
If you use PCN in your research, please cite it as:
@misc{solatorio2025proofcarryingnumberspcnprotocol,
title = {Proof-Carrying Numbers (PCN): A Protocol for Trustworthy Numeric Answers from LLMs via Claim Verification},
author = {Aivin V. Solatorio},
year = {2025},
eprint = {2509.06902},
archiveprefix = {arXiv},
primaryclass = {cs.CL},
url = {https://arxiv.org/abs/2509.06902},
keywords = {LLM, Numeric Hallucination, Verification, Proof-Carrying, Trust, AI Safety}
}