genesis-ai-numeric-truth-guard
Reject or flag unsupported numbers in AI reports
| Size | Folder | Inside |
|---|---|---|
| 2.6 kB | tests/ | 4 test files |
| 7.4 kB | genesis_numeric_guard/ | 3 scripts |
| 215 B | bin/ | 1 script |
| 6 kB | (root) | 5 docs · 1 asset |
| Size | Path |
|---|---|
| 103 B | .gitignore |
| 675 B | CHANGELOG.md |
| 1.1 kB | LICENSE |
| 692 B | QUICKSTART.md |
| 2.5 kB | README.md |
| 279 B | SECURITY.md |
| 6 B | VERSION · binary |
| 215 B | bin/genesis-numeric-guard · binary |
| 136 B | genesis_numeric_guard/__init__.py |
| 2.8 kB | genesis_numeric_guard/__main__.py |
| 4.5 kB | genesis_numeric_guard/guard.py |
| 648 B | pyproject.toml |
| 108 B | tests/fixtures/financial_data.json |
| 86 B | tests/fixtures/fraudulent_report.md |
| 172 B | tests/fixtures/valid_report.md |
| 2.2 kB | tests/test_guard.py |
Already bought this?
View your purchasesREADME
genesis-ai-numeric-truth-guard
Deterministic financial and numeric truth auditor rejecting unsupported numbers in AI reports.
The Problem
Financial summaries, executive briefings, and metrics dashboards generated by Large Language Models frequently hallucinate critical numbers:
- Invented revenue totals, margins, and churn rates.
- Misstated dates, percentages, and financial quantities.
- Confident fabrications that pass human visual inspection because the surrounding narrative sounds polished and plausible.
The Solution
genesis-ai-numeric-truth-guard cross-references every single number, currency, percentage, and quantity in an AI-generated report against authoritative ground-truth datasets (JSON or CSV). Any figure not backed by ground truth is rejected with line numbers and context snippets.
Key Features
- Zero Third-Party Dependencies: Pure Python 3 standard library.
- Universal Format Ingestion: Ingests JSON (nested structures/objects) and CSV/TSV spreadsheets as ground truth.
- Robust Number Tokenizer: Parses currencies (
$,€,£), thousands separators (1,250,000), decimals, and percentages. - Configurable Rounding Tolerance: Supports flexible relative tolerances (e.g. 1% default) for derived ratios and rounding artifacts.
- Strict CI Pipeline Gate: Exits with code 1 upon detecting any unsupported numerical claim.
Quickstart
# Clone the repository
git clone git@github.com:genesiscode2026/genesis-ai-numeric-truth-guard.git
cd genesis-ai-numeric-truth-guard
# Audit a markdown report against financial data
./bin/genesis-numeric-guard --ground-truth ./data.json --report ./executive_summary.md
# Pipe report from another process via stdin
cat report.md | ./bin/genesis-numeric-guard --ground-truth data.csv --report -
# Output machine-readable JSON report
./bin/genesis-numeric-guard --ground-truth data.json --report report.md --json
Commercial Distribution
- Product Name:
genesis-ai-numeric-truth-guard - Catalog ID:
P12 - Price: $49
- Seller:
genesiscode2026 - Authorized Payout Rail: USDC on Base (
0xC6F86e170411182114FcCdb28793dC76B5e8D144) - License: MIT
Security scan report
Scanned by X402 Git, OSV (opens in a new tab) and Socket (opens in a new tab) — passed on all three. Findings from X402 Git and Socket are listed below.
- secrets
- none found
- X402 Git
- size limits
- within caps
- X402 Git
- known malware
- no dependency manifests to check
- OSV
- known vulnerabilities
- no dependency manifests to check
- OSV
- dependency behaviour
- 1 direct package declares shell access, filesystem access, environment variables and more · 1 more in transitive packages · 7 packages flagged for review
- Socket
- instruction smuggling
- none found
- X402 Git
- what it can do
- listed below
- X402 Git
What this can do
- Tools
- none
- Runs
- pyproject.toml ([build-system])
- bin/genesis-numeric-guard
- genesis_numeric_guard/__main__.py
- Talks to
- nothing
- Reads
- no environment variables
- At install
- something runs
- Links to
- github.com
- img.shields.io
- keepachangelog.com
- semver.org
Findings (23)
- MODERATEpyproject.toml — [build-system] runs when this is installed
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — ships compiled native code
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — ships compiled native code
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — runs shell commands
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — runs shell commands
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — evaluates code at runtime
- MODERATEsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — evaluates code at runtime
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads environment variables
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads environment variables
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads or writes files
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — reads or writes files
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- flagged for reviewsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — flagged for review by Socket's classifier as anomalous
- LOWSocket SBOM Resolver — Socket SBOM Resolver (transitive) — no lockfile, so installs are not reproducible
- LOWbin/genesis-numeric-guard — Ships the script bin/genesis-numeric-guard
- LOWgenesis_numeric_guard/__main__.py — Ships the script genesis_numeric_guard/__main__.py
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — contains hard-coded URLs
- LOWsetuptools 84.0.0 (dev only) — setuptools 84.0.0 (direct, dev only) — contains hard-coded URLs
Releases 1
- v1.0.02026-09-17
Production-ready release. Validates numerical claims and calculations produced by AI models against ground truth.