Inspiration

The expensive failure is often not “we could not read the PDF.” It is “we read it, trusted it, and approved it without preserving why.” Vendor and compliance packets mix dates, names, totals, policies, and public claims across pages. Generic extraction summaries make that information easier to consume but can make unsupported approval faster. We wanted a workflow that keeps AI useful without letting confidence become authority.

What it does

Document Trust Gate reviews vendor and compliance packets before they become an approval. Nutrient DWS extracts a fixed set of decision fields with citations and confidence. SerpApi checks explicitly printed public claims against current web evidence. The agent does not stop at detection: it completes the available research, shows what it checked, and attaches a concrete proposed resolution to every warning. A person can edit any action or opt into applying the bound proposals automatically. Critical findings remain on hold unless a named reviewer records an explicit exception and its reason.

How it works

  1. A reviewer uploads one to four PDFs after an explicit processing disclosure.
  2. Nutrient agentic extraction maps each document into a fixed schema with confidence, page numbers, and bounding boxes.
  3. Deterministic rules check expiration, totals, identity, missing material fields, and legal-name consistency across documents of the same type.
  4. SerpApi runs only conservative public queries derived from claims printed in the source document.
  5. The agent groups each claim's searches, distinguishes exact and authoritative candidates, records the investigation, and proposes the strongest supported next action without turning search absence into a false accusation.
  6. Human-first controls let a reviewer edit any action. An optional autonomous mode applies only the already-bound proposals; critical exceptions stay human-only.
  7. The app emits a receipt binding the source, extraction, searches, investigation, proposals, policy, schema, decision actors, reviewer, and disposition under SHA-256.

Where Nutrient does the heavy lifting

Nutrient DWS turns messy PDFs into the cited, structured evidence that creates the review queue; without that extraction and grounding, the product has no trustworthy document layer.

Why SerpApi matters

SerpApi connects document claims to current, structured public evidence while preserving uncertainty: missing results become a review task, never an invented fact. Even a positive result remains evidence awaiting human interpretation rather than an automatic truth signal.

Accomplishments

  • Completed the exact live browser path against both sponsor APIs.
  • Bound a real Nutrient request with 23 page citations and six SerpApi search IDs into the new completed-investigation review chain.
  • Added source-page links so citations are operational inside the reviewer workflow.
  • Made every public search outcome evidence-bound instead of inventing a score or fact, while requiring the agent to finish its research and propose the next action.
  • Added human-first controls plus an opt-in autonomous path whose policy actions are constrained to the recorded proposals and remain individually editable.
  • Grouped supporting low-confidence fields while preserving individual material-field review, reducing click fatigue without weakening the gate.
  • Passed 29 tests plus an exact browser execution of human-first and autonomous paths, JavaScript syntax, Python compilation, exact-secret scanning, and clean isolated installation from the frozen source ZIP.
  • Proved the live upload path with a separately generated judge-style PDF whose company, filename, identifiers, totals, and claims do not occur in the bundled demo; Nutrient extracted it, SerpApi investigated it, and the app emitted a valid bound receipt without fixture leakage.

Challenges and lessons

The hardest product decision was resisting a numeric “trust score.” Without a validated relationship to real-world document truth, that number would add authority without evidence. Clear dispositions—HOLD, AWAITING_EVIDENCE, REJECTED, EXCEPTION_APPROVED, REVIEW_COMPLETE, and CLEARED—proved more honest and useful.

Search relevance was the second challenge. A successful API response is not the same thing as corroboration. The product therefore exposes the original claim, all planned queries, search IDs, timestamps, result links, match counts, investigation result, and proposed action. A person can override it; the agent cannot simply hand off raw links.

Integrity model

The receipt binds source-file hashes, Nutrient request and extraction hashes, SerpApi search IDs and result hashes, the policy/schema versions, every investigation, proposal, decision actor, named reviewer when applicable, and final disposition. It is an integrity-checkable checksum, not a digital signature or external timestamp.

What is next

The next production step would anchor receipt hashes to an external timestamp or signature service, add organization-specific policy packs with versioned approval, and integrate disposition events with procurement systems. Those are explicitly future work; the hackathon release does not claim non-repudiation or legal determination.

Boundary

Decision support only. Autonomous mode can apply bounded proposed holds and evidence requests, but cannot approve critical exceptions, invent facts, alter the source PDF, or make legal conclusions. An absent search result never proves a statement false.

Built with

Python, FastAPI, Nutrient Data Extraction API, SerpApi Google Search API, aiohttp, HTML, CSS, JavaScript, pytest, and SHA-256 integrity bindings.

Submission links

  • Source: https://github.com/equinoxaifinance-rgb/document-trust-gate
  • Demo video: https://youtu.be/myvPKkPQo8Q
  • Final source ZIP SHA-256: recorded in the public repository's release receipt.

Built With

Share this project:

Updates

Submission history