{"slug": "agentic-ai-drops-digits-this-library-catches-them-before-it-runs-in-fintech", "title": "Agentic AI drops digits, This library catches them before it runs in fintech", "summary": "PrismManifest 0.3.4, an open-source Python library from insightitsGit, provides a zero-trust gate that verifies Ed25519-signed ParameterManifests before allowing probabilistic AI outputs (LLMs, OCR) to pass dollar amounts into deterministic financial compute DAGs, preventing digit drops and unauthorized money values in fintech engines. The library, available via pip install prismmanifest, routes outcomes as ACCEPT, ACCEPT_PENDING_HUMAN, or REJECT, and supports optional CUDA and cloud KMS integrations.", "body_md": "**Zero-trust tool-argument gate for deterministic AI tool execution.**\n\n*(Formerly ParamGate — same design; package prismmanifest, CLI prismmanifest-gate.)*\n\nPrismManifest sits between probabilistic extractors (LLMs, OCR, table parsers) and\ndeterministic Group 3 compute DAGs. Unverified money values never enter the DAG.\nOnly an Ed25519-signed `ParameterManifest`\n\nthat clears the Group 3 boundary\nis allowed through.\n\nDeterministic Engine + Unverified Probabilistic Input = Deterministic Wrong Answer\n\nPyPI name |\n`prismmanifest` |\n\n**Version**`0.3.4`\n\n**Python****License****Repository**[insightitsGit/PrismManifest](https://github.com/insightitsGit/PrismManifest)** Discussions**[Q&A and design](https://github.com/insightitsGit/PrismManifest/discussions)** Docs (Markdown)**`docs/`\n\n**Docs (PDF)**`docs/pdf/`\n\n**Usage guide**`docs/USAGE_FOR_ENGINEERS_AND_ARCHITECTS.md`\n\n**Security**`SECURITY.md`\n\n**Keywords:** tool argument gate, ParameterManifest, digit drop prevention, zero-trust LLM tool args, deterministic DAG boundary, OCR money field authorization, PrismManifest\n\nProbabilistic systems (LLMs, OCR) are excellent at **proposing** where a number is.\nThey must not be trusted to **authorize** the dollar amount that enters a tax engine,\nledger, or underwriting model. PrismManifest is that authorization boundary.\n\n```\npip install prismmanifest\n```\n\nWith optional extras:\n\n```\npip install \"prismmanifest[dev]\"\npip install \"prismmanifest[cuda]\"          # NVIDIA GPU + Numba\npip install \"prismmanifest[kms-azure]\"     # Azure Key Vault envelope keys\npip install \"prismmanifest[kms-aws]\"       # AWS KMS envelope (optional)\n```\n\nFrom source (editable):\n\n```\ngit clone https://github.com/insightitsGit/PrismManifest.git\ncd PrismManifest\npython -m pip install -e \".[dev]\"\npython -m pytest -q\n```\n\nCLI after install: `prismmanifest-gate`\n\n.\n\n| Extra | Purpose |\n|---|---|\n`dev` |\npytest, coverage, grpcio-tools |\n`docs` |\nmarkdown + fpdf2 (PDF pack builder) |\n`cuda` |\nNumba + CUDA 12 wheels (GPU required) |\n`kms-azure` / `kms` |\nAzure Key Vault wrap (preferred cloud KMS) |\n`kms-aws` |\nboto3 AWS KMS-envelope |\n\n- Treat LLMs / OCR / parsers as\n**untrusted**. - Put PrismManifest\n**after** extraction and**before** any calculator, underwriting, or ledger tool that consumes dollar amounts. - Route outcomes:\n`ACCEPT`\n\n→ run DAG ·`ACCEPT_PENDING_HUMAN`\n\n→ review ·`REJECT`\n\n→ stop. - Never let model-generated money text be the tool argument — only evidence-bound, signed manifests.\n\n```\nLLM / OCR  →  PrismManifest  →  signed ParameterManifest  →  Group 3 DAG\n```\n\nExtra LLM benches are **optional evidence**. They do not change the core gate design.\nFinding real customer documents matters more for production claims than multi-model FA studies.\n\nFull write-up: [Usage for Engineers & AI Architects](/insightitsGit/PrismManifest/blob/main/docs/USAGE_FOR_ENGINEERS_AND_ARCHITECTS.md)\n(and PDF: `docs/pdf/01_USAGE_FOR_ENGINEERS_AND_ARCHITECTS.pdf`\n\n).\n\n``` python\nfrom prismmanifest import KeyRing, PrismManifestPipeline, enforce_group3_boundary, GateDecision\nfrom prismmanifest.router import DocumentPackage, IntentRouter\nfrom prismmanifest.integrations import demo_capital_gains_dag\n\nkeyring = KeyRing.generate(key_id=\"local-dev-ed25519\")\n\npackage = DocumentPackage(\n    doc_id=\"1040.txt\",\n    pages=[\n        \"Form 1040 Tax Year 2024\\n\"\n        \"Line 1 Gross income: $470,000.00\\n\"\n        \"Line 11 Adjusted gross income: $450,000.00\\n\"\n    ],\n    form_type=\"IRS_FORM_1040\",\n    tax_year=2024,\n)\n\n# Route → ingest + span extraction (Pattern B pointers)\nrouted = IntentRouter().run(package)\n\n# Verify, decide gate, sign manifest\npipeline = PrismManifestPipeline(keyring)\nresult = pipeline.run_on_evidence(\n    evidence=routed.evidence,\n    extraction=routed.extraction,\n)\n\n# Group 3 hard boundary — this is the security gate\ngate = enforce_group3_boundary(\n    result.manifest,\n    public_keys=keyring,\n    expected_dag_id=\"capital_gains_v3\",\n)\nif gate.decision is GateDecision.ACCEPT:\n    receipt = demo_capital_gains_dag(gate.manifest)\n    print(receipt)\nelse:\n    print(gate.decision, gate.message)\npython\nfrom prismmanifest.audit import EscalationQueue\nfrom prismmanifest import PrismManifestPipeline, KeyRing\n\nkeyring = KeyRing.generate()\nqueue = EscalationQueue(\".escalation\")\npipeline = PrismManifestPipeline(keyring, escalation_queue=queue)\n# PASS_WITH_HUMAN manifests are signed and auto-enqueued when a queue is attached.\npython\nfrom prismmanifest import parameter_gated, KeyRing\n\nkeyring = KeyRing.load(\".keys\")\n\n@parameter_gated(public_keys=keyring, expected_dag_id=\"capital_gains_v3\")\ndef run_dag(*, manifest):\n    return manifest.fields[0].value_fixed_micro\n```\n\nProduction trust must still go through `enforce_group3_boundary`\n\n/ gRPC / C++ / in-process `prismmanifest_c`\n\n.\n\n``` python\nfrom prismmanifest.binary_codec import encode_manifest\nfrom prismmanifest.gate import enforce_group3_boundary\n\nbuf = encode_manifest(signed_manifest)\nresult = enforce_group3_boundary(buf, public_keys=keyring, expected_dag_id=\"capital_gains_v3\")\n```\n\nSchema: [ schemas/prismmanifest.fbs](/insightitsGit/PrismManifest/blob/main/schemas/prismmanifest.fbs).\n\n- Skip\n`enforce_group3_boundary`\n\nbecause the pipeline “looked good” - Feed LLM-printed\n`$`\n\nstrings straight into the DAG - Treat\n`@parameter_gated`\n\nalone as the boundary - Market\n`cuda_sim`\n\n/ SKIP as CUDA-validated\n\n**Ingest evidence** with dual-OCR consensus (PDF text + layout re-tokenizer; optional Tesseract).**Ground claims** to verbatim spans and form anchors (no generative money values).**Decide**`PASS`\n\n/`PASS_WITH_HUMAN`\n\n/`REFUSE`\n\nvia quorum, OCR floor (≥ 0.98), and plausibility.**Sign** a`ParameterManifest`\n\n(Ed25519) and optionally escalate human review.**Enforce** the Group 3 boundary before any DAG runs — Python, gRPC, C++ FlatBuffer, or in-process DLL.\n\nFinancePackBench and FinancePackBench-G4 provide synthetic SLA / adversarial suites.\n\n| Status | Meaning |\n|---|---|\n`PASS` |\nSpan-grounded, plausibility OK, no disagreement, OCR ≥ 0.98, anchors OK |\n`PASS_WITH_HUMAN` |\nImmaterial disagreement (≤ $1k), low OCR, or anchors unverified |\n`REFUSE` |\nNot grounded, plausibility failure, or material disagreement (> $1k) |\n\n| Decision | When |\n|---|---|\n`ACCEPT` |\n`PASS` , or cleared `PASS_WITH_HUMAN` with valid human approval token |\n`ACCEPT_PENDING_HUMAN` |\n`PASS_WITH_HUMAN` awaiting review |\n`REJECT` |\n`REFUSE` , bad/missing clearance, or attestation/freshness/replay/dag failure |\n\nAttestation, freshness (`signed_at_unix`\n\nskew, default 300s), and replay (`ReplayGuard`\n\n) failures raise `GateError`\n\n.\n\n```\n# Keys\nprismmanifest-gate gen-keys --out .keys --key-id local-dev-ed25519\nprismmanifest-gate gen-hsm-key --out .hsm --key-id prod-ed25519\nprismmanifest-gate gen-kms-key --out .kms --mode local --key-id kms-dev\n# Azure: prismmanifest-gate gen-kms-key --out .kms --mode azure --kms-key-id <vault-key-url>\n\n# Sign / verify\nprismmanifest-gate sign --keys .keys --manifest manifest.json --out signed.json\nprismmanifest-gate sign --keys .keys --manifest manifest.json --out signed.fbs --flatbuffer\nprismmanifest-gate verify --keys .keys --manifest signed.json --dag-id capital_gains_v3\n\n# Benches & proof\nprismmanifest-gate bench --packages 500\nprismmanifest-gate bench --require-cuda --packages 40\nprismmanifest-gate bench-manifest-parity --packages 500 --require-cuda\nprismmanifest-gate bench-perf --out reports/perf\nprismmanifest-gate bench-customer-pdf --corpus .corpus/customer --seed-synthetic\nprismmanifest-gate compliance --out reports/compliance\nprismmanifest-gate pilot-pack --out reports/pilot_pack\nprismmanifest-gate g4-suite --out reports/g4 --fuzz 200\n\n# Ops / review\nprismmanifest-gate audit-replay --store .audit --receipt <id> --keys .keys\nprismmanifest-gate escalation-list --queue .escalation\nprismmanifest-gate review-ui --queue .escalation --keys .keys --bind 127.0.0.1:8766\n```\n\nProto: `proto/prismmanifest_gate.proto`\n\nService: `prismmanifest.v1.Group3Gate`\n\n— `VerifyManifest`\n\n, `ExecuteDag`\n\n``` python\nfrom prismmanifest.attestation import KeyRing\nfrom prismmanifest.grpc_servicer import serve\n\nserve(KeyRing.load(\".keys\"), bind=\"[::]:50051\")\n# Windows\npowershell -File scripts/build_cpp_gate.ps1\n# Produces: prismmanifest_gate_enforce.exe + prismmanifest_c.dll\nprismmanifest_gate_enforce signed.fbs public.pem <key_id> capital_gains_v3\n```\n\nPython can call the shared library without process spawn:\n\n``` python\nfrom prismmanifest.cpp_bridge import enforce_fb, bridge_status\nprint(bridge_status())  # inprocess_available when PRISMMANIFEST_C_DLL / build present\n```\n\n“Ops packaging” = how you **run** the gate in a service (not the algorithm):\n\n- Keys (local / software-HSM / Azure KV)\n- RBAC, timeouts, idempotency, metrics (\n`prismmanifest.ops`\n\n) - Audit store + human review UI\n- Optional C++ / CUDA beside the Python package\n\nSee [ docs/handoff/PILOT_DEPLOY.md](/insightitsGit/PrismManifest/blob/main/docs/handoff/PILOT_DEPLOY.md).\n\n| Doc | Role |\n|---|---|\n|\n\n[PRISMMANIFEST_SYSTEM_DESIGN.md](/insightitsGit/PrismManifest/blob/main/docs/PRISMMANIFEST_SYSTEM_DESIGN.md)**authority**)[PRISMMANIFEST_IMPLEMENTATION_PLAN.md](/insightitsGit/PrismManifest/blob/main/docs/PRISMMANIFEST_IMPLEMENTATION_PLAN.md)[PRISMMANIFEST_MASTER_SPECIFICATION.md](/insightitsGit/PrismManifest/blob/main/docs/PRISMMANIFEST_MASTER_SPECIFICATION.md)[FINANCEPACKBENCH_G4_ADVERSARIAL_SUITE.md](/insightitsGit/PrismManifest/blob/main/docs/FINANCEPACKBENCH_G4_ADVERSARIAL_SUITE.md)[FINANCEPACKBENCH_PROMPT_INJECTION_SEMANTICS.md](/insightitsGit/PrismManifest/blob/main/docs/FINANCEPACKBENCH_PROMPT_INJECTION_SEMANTICS.md)`PASS`\n\n[docs/pdf/](/insightitsGit/PrismManifest/blob/main/docs/pdf/README.md)Regenerate PDFs:\n\n```\npip install \"prismmanifest[docs]\"   # or: pip install markdown fpdf2\npython scripts/build_docs_pdf.py\nprismmanifest/           Python package\ncpp/gate/            C++ canonicalize + FlatBuffer enforce + prismmanifest_c\ncuda/kernels/        Experimental .cu kernels\nschemas/             prismmanifest.fbs\nproto/               gRPC Group3Gate\ntests/               pytest\ndocs/                Specs + usage + PDF output\nscripts/             proto, C++ build, CUDA shim, PDF builder\nreports/             Generated proof artifacts (not required for pip install)\n```\n\n| Label | Meaning |\n|---|---|\nPilot OSS |\nSynthetic + adversarial FA=0 under test; Py/C++/CUDA decision parity; in-process C++ path |\nProduction claim |\nRequires your live customer fax/scanned corpus to pass the same FA/SLA bar |\n\nAlso:\n\n**Security boundary**=`enforce_group3_boundary`\n\n/ gRPC / C++ /`prismmanifest_c`\n\n— not`@parameter_gated`\n\nalone.**CUDA:** real parity needs GPU + Numba;`cuda_sim`\n\nis CI self-check only.**HSM:**`gen-hsm-key`\n\nis software encrypted-at-rest, not PKCS#11 hardware.**Prompt injection:** PrismManifest is an execution trust gate — see the injection semantics doc before claiming “injection defense.”\n\nPublishing notes: [ docs/PUBLISHING.md](/insightitsGit/PrismManifest/blob/main/docs/PUBLISHING.md).\n\n| Channel | Use for |\n|---|---|\n|\n\n[Issues](https://github.com/insightitsGit/PrismManifest/issues)[SECURITY.md](/insightitsGit/PrismManifest/blob/main/SECURITY.md)[CONTRIBUTING.md](/insightitsGit/PrismManifest/blob/main/CONTRIBUTING.md)Apache License 2.0 — see [LICENSE](/insightitsGit/PrismManifest/blob/main/LICENSE).\n\n- Author:\n**Amin Parva**([insightits.info@gmail.com](mailto:insightits.info@gmail.com)) - Company:\n[https://www.insightits.com](https://www.insightits.com) - GitHub:\n[https://github.com/insightitsGit/PrismManifest](https://github.com/insightitsGit/PrismManifest) - PyPI:\n[https://pypi.org/project/prismmanifest/](https://pypi.org/project/prismmanifest/) - Product page:\n[https://www.insightits.com/products/prismmanifest.html](https://www.insightits.com/products/prismmanifest.html)", "url": "https://wpnews.pro/news/agentic-ai-drops-digits-this-library-catches-them-before-it-runs-in-fintech", "canonical_source": "https://github.com/insightitsGit/PrismManifest", "published_at": "2026-08-14 17:32:07+00:00", "updated_at": "2026-08-14 17:41:16.501790+00:00", "lang": "en", "topics": ["ai-safety", "ai-tools", "developer-tools", "artificial-intelligence"], "entities": ["PrismManifest", "insightitsGit", "PyPI", "GitHub", "Azure Key Vault", "AWS KMS", "NVIDIA", "Numba"], "alternates": {"html": "https://wpnews.pro/news/agentic-ai-drops-digits-this-library-catches-them-before-it-runs-in-fintech", "markdown": "https://wpnews.pro/news/agentic-ai-drops-digits-this-library-catches-them-before-it-runs-in-fintech.md", "text": "https://wpnews.pro/news/agentic-ai-drops-digits-this-library-catches-them-before-it-runs-in-fintech.txt", "jsonld": "https://wpnews.pro/news/agentic-ai-drops-digits-this-library-catches-them-before-it-runs-in-fintech.jsonld"}}