Design Contract Metadata Extraction for an Agreement Repository
Last updated: November 29, 2026
Quick Overview
Design an ML system that reads uploaded agreements and extracts structured fields such as parties, effective date, renewal terms, termination notice period and governing law, so customers can search their repository and get alerts before renewals.
DocuSign
November 29, 20260
0
0 solved
Design an ML system that reads uploaded agreements and extracts structured fields such as parties, effective date, renewal terms, termination notice period and governing law, so customers can search their repository and get alerts before renewals.
DocuSign's Intelligent Agreement Management platform, including Navigator and the Iris AI engine, depends on reliably turning unstructured contracts into data. The interviewer checks that you can combine document parsing, model choice, confidence and human review, and evaluation tied to the cost of a wrong renewal date.
What the Interviewer Expects
- Start from the user value: renewal alerts make wrong dates expensive, so precision and calibrated confidence matter
- Handle scanned PDFs with OCR and layout, and long documents with chunking or retrieval
- Choose a hybrid: span extraction or LLM with grounded citations, plus normalisers for dates and durations
- Route low-confidence fields to human review and learn from corrections
- Evaluate per field with exact-match on normalised values, not just token F1
- Address tenant isolation and that customer contracts must not leak across tenants through training
Key Topics to Cover
How to Approach This
- Start by mapping the business objective to a concrete ML objective and metric.
- Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
- Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
- Address the serving latency budget and whether batch or real-time inference is needed.
- Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
- How do you compute the actual renewal date from 'renews automatically for successive one-year terms unless notice is given 60 days prior'?
- A customer uploads 200,000 legacy contracts in a day. How does the pipeline handle the burst and cost?
- How would you detect drift when a new customer has unusual contract templates?
- Can you fine-tune on customer documents? What consent and isolation are required?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice ML System Design ProblemsSample Answer
Requirements
Inputs: PDFs, DOCX and scans, 1 to 200 pages, many languages. Outputs: a typed record per agreement with each field's value, normalised form, source span and confidence. Targets: high precision on dat...
High-Level Design
Ingest to a queue, then: text and layout extraction (native PDF text, OCR for scans) producing tokens with coordinates; document classification (NDA, MSA, order form, amendment) to choose the field se...