Inspiration

Document AI is good at finding text, but extraction confidence is not the same as business truth. In our benchmark, an API reference says POST while an older runbook says PUT; a quality policy requires two approvals while the runbook says one; and retention is either 180 or 90 days depending on the document.

A search or chat system can retrieve both statements, but a downstream agent still has to decide which statement is eligible to drive an operation. VeriFact Intake adds that missing trust boundary between extraction and ontology truth.

What it does

VeriFact processes three deliberately conflicting business documents. Nutrient DWS produces structured evidence blocks. A versioned runtime profile identifies semantic fields and source authority but contains no expected values or prewritten quotes. The compiler derives each typed value and exact quote from extracted evidence.

Deterministic trust policies automatically promote only safe, unambiguous claims. Conflicting or lower-authority claims enter a human decision inbox where reviewers compare values, source authority, confidence, and exact evidence.

Every decision is appended rather than overwritten. Every effective fact is versioned and names the assertions that justify it. The ontology export includes page-level provenance and a verifiable hash-chained audit head.

A checked-in 30-case trust benchmark measures that boundary instead of merely describing it. A confidence-only selector makes 90 unreviewed conflict choices and selects the wrong value 60 times. VeriFact detects all 90 expected conflicts, automatically promotes none of them, and reaches 100% expected-fact accuracy after gated review.

A downstream agent execution gate makes the consequence operational: before review it refuses to issue a contract; after all eight required facts pass promotion, it releases an evidence-qualified POST /change-api/v2/changes contract with owner, approval count, retention rule, fact versions, and supporting assertion IDs.

How we built it

  • Nutrient DWS Build API performs the core PDF-to-structured-content operation.
  • FastAPI provides intake, review, run history, and ontology export APIs.
  • A provider-neutral extraction port supports live DWS, validated DWS cache replay, and public fixture replay through the same downstream pipeline.
  • Runtime assertion profiles declare patterns, types, and source authority—not the values the demo is expected to produce.
  • Pydantic models enforce immutable source, assertion, conflict, review, and fact contracts.
  • Deterministic trust and promotion policies preserve the invariant Assertion ≠ EffectiveFact.
  • SQLite stores projections and rejects mutation of review and audit records with database triggers.
  • Content-addressed response caching, an explicit live switch, and call and credit budgets prevent accidental billable retries.
  • A deterministic benchmark reuses the production compiler, authority policy, and promotion policy across 30 evidence variations.
  • A fail-closed downstream agent gate converts eight versioned effective facts into an evidence-qualified operation contract.
  • Docker Compose, CI, strict typing, tests, a golden benchmark, and a public-safety scanner make the demo reproducible.

Meaningful use of Nutrient DWS

Nutrient DWS is not a decorative integration. It converts each PDF into structured JSON blocks with text and page location. The evidence compiler matches semantic patterns against those blocks and derives the typed value and exact evidence quote.

If DWS does not provide matching evidence, compilation fails closed and no assertion is manufactured. VeriFact then supplies the authority, conflict, human-review, promotion, provenance, and audit layers that decide whether extracted content may become operational truth.

Challenges

The hardest design problem was preserving a clear boundary between parser output, candidate assertion, review decision, and effective fact. We also separated runtime extraction profiles from golden expected results so fixture replay cannot pass by feeding answers into the compiler.

A second challenge was making the project reproducible without disguising fixture data as a live vendor call. The interface clearly labels LIVE DWS, DWS CACHE, and FIXTURE, while all three modes use the same compiler and trust pipeline.

Accomplishments

  • A complete source-to-truth loop rather than a document-chat demo.
  • Twelve evidence-derived assertions and three intentional conflicts.
  • Four human decisions clear the review queue and produce nine effective facts.
  • Append-only review records and a tamper-evident audit chain.
  • Portable ontology export with artifact, page, block, quote, and assertion provenance.
  • Public synthetic documents and one-command reproducibility.
  • A clean public repository with automated tests, type checking, security scanning, Docker image build, and container smoke testing.
  • A measured result: 90/90 expected conflicts detected, zero unsafe auto-promotions, and 100% final expected-fact accuracy after review.
  • A visible blocked-to-ready transition proving that downstream automation receives no operation contract until the ontology is evidence-qualified.

What we learned

Document extraction and semantic truth are complementary capabilities. Better extraction improves evidence quality, but authority, conflict resolution, and promotion remain explicit domain decisions. Designing those boundaries first makes agentic workflows safer and easier to audit.

What's next

The next step is a constrained agent that proposes new semantic mappings while the same evidence, policy, and human-review gates remain mandatory. Additional document domains can then join through versioned profiles instead of product-specific forks.

Why it can become a product

The first buyer is a platform, quality, or governance team preparing operational knowledge for agents. Each new domain contributes documents plus a small, versioned semantic and authority profile. The trust kernel, review workflow, provenance model, and audit proof stay unchanged, turning this demo into a repeatable intake product for regulated and high-consequence operations.

Demo proof

Evidence comparison and human decision inbox

VeriFact evidence comparison and review workspace

Cleared review queue and promoted facts

VeriFact resolved facts and proof

Tamper-evident audit ledger

VeriFact audit proof

Measured trust benchmark

VeriFact 30-case trust benchmark

Evidence-qualified downstream agent contract

VeriFact downstream agent execution gate

Built With

Share this project:

Updates