How to Extract Contract Obligations With Source Citations
Extract contract duties into structured fields and connect each one to a source clause for review.

A contract summary can miss who must do what, when they must do it, and which clause supports the answer. An obligation record keeps those fields together so a reviewer can check the source before anyone acts on it.
This guide extracts obligations from a short sample agreement using Unsiloed Extract. The example keeps the API response and its citations; it does not calculate legal deadlines or replace legal review.
Start With a Sample Agreement
The sample includes two affirmative duties and a sentence saying weekend support is not required. That negative example matters: a system that reports it as a duty has changed the meaning of the clause.
Download the sample Python project, unpack it, and run:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python make_fixtures.py
python -m unittest -v
export UNSILOED_API_KEY="your-api-key"
python extract.py contract.pdf contract-schema.json contract-result.json
The schema requests an array of obligations with a party, duty, timing and clause reference. It asks for NOT_STATED where timing is missing and tells the extractor to exclude statements of what is not required. The model can still make mistakes: check both inclusions and omissions against the agreement.
The included test checks a saved sample response offline. In that run, the two affirmative clauses were returned and the sentence about weekend support was excluded. Other documents and runs can produce different results. The diagram below uses a separate illustrative agreement to show how review can work.

Keep the Evidence With Each Field
The script submits the PDF and JSON Schema to /v2/extract with citations enabled, polls the returned job ID, and saves the entire response. It treats both completed and review as terminal results. A review status needs human attention before the result is used.
The response contains scored fields, including their values and, where available, citations. Keep that metadata rather than flattening it away. A citation helps a reviewer locate the text; it does not prove that the extracted obligation is complete or correctly interpreted. See the job results reference for the response structure.
Review the Context Before Acting
Check the actor, action, timing, exceptions and source passage for every proposed duty. A relative phrase such as “within 30 days of the invoice” is not a calendar date until the triggering date is known. Mark unresolved timing for review rather than guessing.
Amendments can change the original language. Preserve the source and version of each extracted item, then compare the current agreement and any amendments before accepting a record. The contract amendment reconciliation guide covers that separate comparison.
Test a representative set of agreements, including negations and clauses with multiple duties. Measure missing and incorrectly added obligations as well as whether the cited passage supports each field. Keep an expert reviewer in the loop before triggering reminders or other actions.
Sign up for Unsiloed to try schema extraction on your own documents.
