AI-Powered Contract Data Extraction and Review Agent

openai · Tech · 2025 · source Agentic: yes · promotional bias: high · source-backed · extracted with prompt 0.5.4 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Tech

OpenAI's finance team needed to scale contract review after volume grew from hundreds to more than a thousand contracts per month.

Constraints:

Architecture

OpenAI's contract data agent is a three-step finance workflow: ingest messy contract files, use retrieval-augmented prompting to pull relevant passages and reason them into structured fields, then present annotations, references, and non-standard-term reasoning to finance experts. The output lands as queryable warehouse data, while humans keep control of ASC 606 and other judgment-heavy classifications.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  contract-ingestion-pipeline["contract-ingestion-pipeline"]
  retrieval-augmented-prompting["retrieval-augmented-prompting"]
  structured-contract-output["structured-contract-output"]
  finance-expert-review["finance-expert-review"]
  data-warehouse["data-warehouse"]
  contract-ingestion-pipeline --> retrieval-augmented-prompting
  retrieval-augmented-prompting --> structured-contract-output
  structured-contract-output --> finance-expert-review
  structured-contract-output --> data-warehouse
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
contract-ingestion-pipeline Normalizes PDFs, scans, phone photos, and handwritten edits into a unified processing pipeline. retrieval-augmented-prompting
retrieval-augmented-prompting Selects relevant contract passages, reasons over them, and generates structured extraction outputs with references. contract-ingestion-pipeline, structured-contract-output
structured-contract-output Tabular contract data including dates, billing terms, renewal clauses, non-standard terms, annotations, and references. retrieval-augmented-prompting, finance-expert-review, data-warehouse
finance-expert-review Human validation layer for unusual terms, ASC 606 classifications, and final finance judgment. structured-contract-output
data-warehouse Queryable store for validated contract data and downstream finance analysis. structured-contract-output

Data flow

Contracts arrive as PDFs, scans, or phone photos and flow into one ingestion pipeline. Retrieval-augmented prompting selects only relevant sections instead of dumping long contracts into context, extracts structured rows with reasoning and references, and hands unusual terms to finance reviewers. Validated tabular output then becomes searchable data for finance workflows.

“PDFs, scanned copies, even phone photos marked up with handwritten edits. What used to be dozens of inconsistent files now flow into one pipeline.”article, stated
“It doesn’t dump a thousand pages into context; it pulls only what’s relevant, reasons against it, and shows its work.”article, stated

Why this architecture

The team chose AI-assisted extraction rather than full automation or linear hiring because finance needed leverage without losing expert judgment. Retrieval keeps the model grounded in relevant contract passages, annotations make outputs auditable, and overnight batch processing fits the workflow better than synchronous chat-style automation.

“take the repetition out of contract review, keep experts firmly in control.”article, stated
“Non-standard terms flagged with reasoning and references.”article, stated

Scale

Alternatives considered (roads not taken)

Hiring linearly with contract volume

Rejected because: The team concluded linear staffing would not scale with hypergrowth, while the agent lets a lean team handle rising volume.

“Without it, you’d have to grow your team linearly in lockstep with contract volume. This lets us keep the team lean while handling hypergrowth.”article, stated

Dumping entire long contracts into context

Rejected because: The system uses retrieval-augmented prompting to pull only relevant sections and show its work.

“It doesn’t dump a thousand pages into context; it pulls only what’s relevant, reasons against it, and shows its work.”article, stated

Letting AI replace finance judgment

Rejected because: The architecture treats the agent as completing manual work, while finance teams still own the story and decisions.

“Engineers describe it as “manual work already done,” not decisions replaced. Finance teams still write the story of the numbers; the Agent ensures they don’t spend their day doing painstaking work.”article, stated

Patterns

rag-retrieval (retrieval)

The agent uses retrieval-augmented prompting to parse contracts into structured data rather than sending the whole document blindly.

“* Inference with prompting: Using retrieval-augmented prompting, the system parses contracts into structured data.”article, stated

structured-output-contract (extraction)

The contract workflow turns varied contract inputs into structured data for downstream finance review and warehouse use.

“* Review: Finance experts review the structured output, complete with annotations and references for any non-standard terms.”article, stated

human-in-the-loop-gate (governance)

Human finance experts remain responsible for reviewing unusual terms and final judgment.

“The agent highlights what’s unusual; humans are then looped in to review.”article, stated

Tradeoffs

Automate repetitive extraction while keeping experts in control of judgment.

Chose AI-assisted contract review with human expert review over hiring linearly with contract volume or fully automating judgment.

Rationale: The source explicitly names this design principle.

“The design principle was simple: take the repetition out of contract review, keep experts firmly in control.”article, stated

Evaluation

Human feedback is used to improve the agent over review cycles.

“Each cycle of human feedback sharpens the Agent, making every review faster and more accurate.”article, stated

Outcomes

The architecture expanded beyond contracts to procurement, compliance, and month-end close.

“Thousands of contracts processed without expanding headcount in lockstep.”article, stated