Back to case studies
LlamaIndex · 2024–2025
AI Dev tools B2B enterprise Human-in-the-loop

Turning LlamaExtract into a product

LlamaExtract is a powerful primitive. I designed the end-user workflow customers kept rebuilding around it — invoice review with contract cross-check, escalation, and supplier loop.

Role
Product Designer
Team
Product Manager · Solution Engineer · Frontend and Backend Engineers
Outcome
Reference implementation · Invoice processing
llamaindex.ai/demo/invoice-review
End-to-end walkthrough

I joined LlamaIndex as the first design hire in 2024. Many customers were integrating LlamaExtract and building the same end-user product around it. The team scoped a deployable reference and I led the design — so customer engineers ship faster and their reviewers get something usable on day one.

What it changed
2
enterprise pilots taken into production
Per-field confidence
shipped to the LlamaExtract API — outlived the pilots
Multi-week build fork
what customer integration now costs
01  ·  Opportunity

Opportunity

LlamaExtract returns structured fields from invoices, contracts, and scanned PDFs. Customers had it in production. What it didn't ship with was an end-user product — a workflow that cross-checks values against contracts, routes ambiguity to a human, escalates violations, keeps an audit log, and closes the loop with the supplier. Each customer's engineering team was building that themselves.

The workflow's shape was nearly identical across customers, but implementations diverged, reviewers saw materially different experiences, and configuration drift made support harder. Per-field confidence scores didn't yet exist on the platform — without them, no UI could honestly decide what to auto-approve. Engineering hours were burning on re-implementations of the same thing, and customers were asking for a reference they could fork.

02  ·  Goal

Goal

I designed the reference for the invoice-processing use case: a four-agent workflow that parses, validates against contracts and POs, routes ambiguity to a human, and produces audit-ready records. Four design questions framed the work:

  1. 01
    Land on a real workflow — one recurring across customers, without each of them rebuilding it.
  2. 02
    Shape the platform — it didn't yet emit the per-field confidence the surface needed to route ambiguity.
  3. 03
    Name the reviewer's job — not edit data, but ratify the agent's decisions.
  4. 04
    Opinionated yet forkable — deployable in audit on day one, adaptable for other verticals.

I anchored on one concrete pattern — invoice review with cross-check — and tested every choice against parts catalogs, healthcare claims, and logistics. Per-field confidence scores started inside this project and were later added to the LlamaExtract API.

A burst of 2,000 invoices doesn't drop 2,000 documents on the queue — the pipeline routes by confidence and cross-check first:

INGEST → EXTRACT → CROSS-CHECK → ROUTE
              vs MSA·PO·     ├─ ≥80%        → auto-approve
              supplier       ├─ 50–79%      → human reviews
              registry       ├─ <50%        → auto-flag Quality
                             └─ check fails → auto-flag Compliance
Out of UI scope
Thresholds, legal documents, the supplier registry, routing rules and schema are configured programmatically per deployment — that's what the customer forks. The human surface is what reviewers touch every day; that's the half I designed.
03  ·  Process & foundations

Process & foundations

Design process — NN/g design thinking, six phases
Design thinking — Empathize, Define, Ideate, Prototype, Test, Implement.

Stack. Built on shadcn, plus four semantic colour families — amber needs review, green approved, blue on hold, red problems — used consistently wherever a state shows up: chip dot, document tint, table badge, breadcrumb pill.

Accessibility — WCAG 2.1 AA. Audited with pa11y and axe across the three core routes. AA is the legal bar (ADA, EU Accessibility Act) and the B2B norm; AAA's 7:1 contrast would have ruled out half the muted palette without real benefit in a desktop audit tool.

04  ·  The product

The product

reference-hitl.app / home
Engagements home

Engagements home

Greeting plus operational summary. Active engagements as cards — monochrome client logos so brand doesn't compete with status colours.

reference-hitl.app / batch / draeger
Batch detail

Batch detail

The four-status taxonomy rolls up to the documents table. The activity feed shows only events that move work forward; field-level approvals live in the field audit log.

reference-hitl.app / review
Review

Review

Queue grouped by lifecycle · the source document · the pinned focus card with filter strip and field list. Only pending fields are tinted amber, so the document reads as a checklist — every coloured value is one decision to close.

05  ·  Design decisions

Design decisions

1

One signal, one job

Each row carries exactly two signals. A coloured dot says what state the field is in — the same colour that tints the value in the document. An actor icon says who decided — an AI sparkle or the reviewer's photo. Hovering the sparkle reveals the confidence percentage; the number is there if you ask, hidden by default.

verify.kpmg.com/hitl
Dot + actor column — the keyboard ↓ walks every field state in turn.
Rejected
Per-row confidence pills. The bucket already is the confidence — the pill is the input to the routing, not a parallel signal. On a busy document it produced confidence soup.
2

Keyboard-first, in decision-relevance order

Enter approves, Shift+Enter flags, Delete reverts — no decision is ever trapped. Tab moves through fields in decision-relevance order — pending, flagged, approved — the way the reviewer thinks, not the way the AI parsed.

verify.kpmg.com/hitl
The whole loop from the keyboard — approve, flag the next as Compliance, submit with a typed reason, never leaving the home row.
3

Quality vs Compliance — two flags, two escalation paths

The central opinion of the product. Early on, flagging was a single confirmation: the field goes red, the document goes to Awaiting Rescan, the supplier gets an email.

Flag form iteration — whiteboard from an eng session
Flag form iteration — whiteboard from an eng session.

It broke on cases a rescan can't fix — a readable VAT ID that doesn't match the master record isn't a scan problem; it needs escalation. So I rebuilt the form to ask why: Quality keeps the one-click rescan flow; Compliance requires a typed reason, becomes a permanent audit-log entry, and routes to escalation.

After — Quality vs Compliance flag form Before — v1 single Reject / Approve Before After
Drag the slider — before/after the Quality vs Compliance split.
verify.kpmg.com/hitl
hitl-comp-note
The Compliance reason becomes a note pinned to the field — visible on every revisit.

This split echoes through the whole system — the four-status taxonomy, the send-back dialog's two-block layout, the audit-log distinction between rescan and escalation events.

4

Autosave + audit log replaces the Save button

Edits debounce 900 ms, then stamp an audit entry — Maya Kahn · Edited · Just now. The field stays pending: ratification is still a separate, explicit action.

verify.kpmg.com/hitl
Edit, pause 900 ms — the "Maya Kahn · Edited · Just now" line lands without a Save click.
Rejected
A Save button. The 200-decisions-a-day reviewer resented the extra click; the 10-a-day reviewer forgot it. The audit log makes the change traceable without costing a click.
5

The focus card is the unit of work

Everything needed to ratify one field — value, actor, hint, audit trail, AI confidence — lives on one card pinned to the right of the document, reshaping around each field's state. The hint changes with state: "AI is unsure — cross-check the highlighted region" for pending, the flagging reason pinned as a note for Compliance, the full edit/approve trail for manually approved fields.

Rejected
A scrolling list with the focused field expanded inline — the user lost context on long invoices. Pinning costs ~60% of the pane's height but keeps the current decision always visible.
6

Send-back auto-categorizes by flag type

"Rescan these pages" is a different ask from "clarify this VAT ID" — separating them turns a two-minute supplier email into a thirty-second one. The dialog captures where the document goes, when a response is due, and is explicit about the consequence: the document moves to On hold until a response arrives. The reviewer never sets that status by hand.

verify.kpmg.com/hitl
hitl-send-back
Send-back dialog — auto-categorised into Quality (rescan) and Compliance (clarify) blocks, each carrying its reason.
06  ·  Trade-offs I owned

Trade-offs I owned

Trade-off 01
Reviewer comfort Audit completeness

In audit, the per-action record is the deliverable — so the surface shows it at every level, at the cost of a denser UI than any consumer flow would tolerate.

Trade-off 02
One deep use case Broad flexibility

Something abstract enough to fit every vertical would have been usable in none. Other verticals fork the reference and re-skin.

Trade-off 03
Calm document At-a-glance state

Only pending fields are tinted; the cost is one click per non-pending field, the value is that the only colour on the page is the next decision to close.

07  ·  Success

Success

Pilots deployed
2 enterprise customers in production
Platform contribution
per-field confidence added to the LlamaExtract API
Customer integration
from multi-week custom build to fork-and-re-skin

A reference implementation is judged by customer deployment — does a customer fork it and put it in production? Two pilots did. The reference moved integration teams from a multi-week build per pilot to fork and re-skin, and per-field confidence scores became a first-class part of the API for every downstream integration.

I won't quote specific accuracy lifts or throughput multipliers — the operating numbers belong to the customers who deployed it. The metrics the design was tuned against: time-to-approval, review accuracy, reviewer throughput, auto-approval rate.
Agents are real — but only when they are measured and scoped.
Dhruv Shah, AI Lead for Global Credit, Carlyle Group · LlamaIndex AI in 60s
08  ·  What I'd carry forward

What I'd carry forward

Open problems: batch-level supplier outreach (the menu item exists; the flow behind it is the next gap), and trust on Compliance flags — the reviewer sees what failed but not which legal document caused it.

Three shifts I'd carry to the next reference-implementation job:

  1. 01
    Every signal owns one piece of information — bucket = decision, dot = state, avatar = actor, focus card = confidence. Five things, five jobs, no overlap; anything an existing element already carried didn't ship.
  2. 02
    Name the human's job, then design around itratify the agent's decisions, and keyboard-first, Enter-approves, no-Save-button all fell into place.
  3. 03
    The audit log is a first-class artifact — when the system and the human write to the same record, it has to be readable by a third party a year later. It isn't logging — it's the document's biography.
All supplier names, invoice amounts, engagement IDs, field values, and customer branding shown are illustrative — used to make the design legible, not to represent real customer engagements. KPMG appears as an illustrative tenant only.
Next case
Building the design function from zero