Skip to content

Fintech

Document intelligence

A grounded extraction-and-review pipeline for dense financial filings: it reads every document, extracts the fields downstream systems need, gates low-confidence output to a human, and routes the rest straight through — with every answer traced to its source span and measured against an eval suite.

  • LangGraph
  • pgvector
  • Postgres
  • Go
-82%

manual review

throughput per analyst

3.5×

In short

  • Analysts stopped reading every filing — only low-confidence extractions reach a human now.
  • Every extracted field traces back to the exact source span it came from.
  • Accuracy is measured on a labelled eval suite that runs in CI, not assumed.

The engagement

Sector
Financial services (B2B)
Company shape
Series B, ~200 people
Engagement
Discovery → build → handover, ~14 weeks
Team
2 engineers + a fractional ML lead
Region
North America

Anonymised by policy

Every engagement runs under NDA — we protect our clients' confidentiality as a matter of policy, and we'd extend the same discretion to your work. The constraints, the shape, and the outcome here are real; the identity is redacted.

The challenge

Every filing landed as a dense, inconsistently-formatted PDF, and an analyst had to read the whole thing before any downstream process could start. Volume grew faster than the team could hire, review times stretched into days, and the manual step was the bottleneck for the entire product.

Off-the-shelf OCR and a naive LLM prompt both failed the bar that mattered: finance can't act on a plausible-looking number that isn't traceable to the source. Any system had to be right, cite where it got each value, and know when it wasn't sure.

The approach

  1. 1
    Ground the problem in a real eval set

    We built a labelled evaluation set of representative filings first, so every later change was measured, not guessed. Accuracy targets and a confidence threshold were agreed up front.

  2. 2
    Retrieval over generation

    Documents are chunked and embedded; extraction is grounded in retrieved spans rather than free generation, so every field maps back to the exact source text.

  3. 3
    Confidence gating, not blind automation

    A calibrated confidence score routes low-certainty extractions to a human review queue and lets high-certainty ones flow straight through — the human effort goes only where it changes the answer.

  4. 4
    Trace + observe everything

    Each run is traced end-to-end (input → retrieved spans → extraction → decision), so a wrong answer is debuggable and the eval suite runs in CI on every change.

The solution

The pipeline ingests a filing, chunks and embeds it, and runs grounded extraction against the retrieved spans. A confidence gate splits the output: anything below the threshold is queued for a human with the source span pre-highlighted; everything above flows straight to structured output. The eval suite runs on every change, so a regression is caught before it ships — reliability is a measured property of the system, not a hope.

The system we built

  1. IngestPDF → normalized text
  2. Chunk + embedpgvector store
  3. Grounded extractionretrieval-first, cited spans
  4. Confidence gatethreshold routing
  5. Human reviewlow-confidence only
  6. Structured outputdownstream-ready
Abstract by design — the architecture we built, not a client screen. No confidential data is shown.
Illustrative
The reviewer queue — low-confidence extractions only
Illustrative
2-min walkthrough: ingest → gate → structured output

The results

manual review

-82%

vs. the fully-manual baseline

throughput per analyst

3.5×

vs. the pre-automation baseline

hallucinated citations in eval

0

on the held-out eval set

Data & safety

Evaluation
A labelled eval suite runs in CI — extraction is scored on every change, not spot-checked.
Guardrails
A calibrated confidence gate routes low-certainty output to human review; only high-confidence fields flow straight through.
Data handling
Runs inside the client's environment — filings and extracted data never leave their systems.
Traceability
Every run is logged end-to-end (input → retrieved spans → decision) for audit.

The stack

Orchestration
LangGraph, Go
Retrieval
pgvector, Postgres
Eval + tracing
Custom eval suite, OpenTelemetry
Capability: LLM Integration & Evals
The system tells us when it isn't sure — that's the part that let us trust it in production.

Questions we get

Extraction is grounded in retrieved source spans rather than free generation, every field traces back to the exact text it came from, and the whole pipeline is measured against a labelled eval suite that runs on every change.

A calibrated confidence score routes low-certainty extractions to a human review queue with the source span pre-highlighted, while high-confidence output flows straight through — so human effort goes only where it changes the outcome.

By retrieving before generating, citing the source span for every field, and gating anything the eval suite or confidence score flags — an unverifiable value never reaches the structured output.

It slots in behind your current intake and emits structured output your downstream systems consume directly — no rip-and-replace. We build in your stack and hand it over with the eval suite and traces.

Yes — extraction runs as durable background work, so spikes queue instead of dropping, and the confidence gate keeps human effort roughly flat as volume climbs rather than scaling linearly with it.

More selected work

// Let's build

Want an outcome like this on your problem?

Tell us where you are. We reply within a day with a concrete next step.