Automated Contract Processing and Rights Analysis Using Multi-Model LLM Pipeline

condé_nast · Media & Entertainment · 2025 · source Agentic: no · promotional bias: med · 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: Contract processing and rights analysis

Condé Nast needed to process contracts, identify rights, match templates, and support licensing decisions faster while maintaining legal accuracy, regulatory alignment, and human expert oversight.

Constraints:

Architecture

AWS and Condé Nast built a Step Functions-orchestrated pipeline using S3, EventBridge, SageMaker Processing, Amazon Bedrock, Claude 3.7 Sonnet, Bedrock Knowledge Bases, Lambda, clustering, spreadsheets, and visualizations. A contract upload triggers the workflow. Claude’s visual reasoning converts PDF page images to text, a second Claude step extracts metadata from a prompt-provided schema, a third step compares the contract to templates in a Bedrock knowledge base and summarizes semantic differences, humans review the results, valid outputs load into the rights/royalties system, and low-similarity contracts are clustered so experts can draft new templates for future runs.

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

flowchart LR
  contract-upload-s3["contract-upload-s3"] --> eventbridge-trigger["eventbridge-trigger"]
  eventbridge-trigger["eventbridge-trigger"] --> step-functions-workflow["step-functions-workflow"]
  step-functions-workflow["step-functions-workflow"] --> pdf-text-preprocessing-job["pdf-text-preprocessing-job"]
  contract-upload-s3["contract-upload-s3"] --> pdf-text-preprocessing-job["pdf-text-preprocessing-job"]
  pdf-text-preprocessing-job["pdf-text-preprocessing-job"] --> claude-bedrock-model["claude-bedrock-model"]
  pdf-text-preprocessing-job["pdf-text-preprocessing-job"] --> processed-text-s3["processed-text-s3"]
  step-functions-workflow["step-functions-workflow"] --> metadata-extraction-job["metadata-extraction-job"]
  processed-text-s3["processed-text-s3"] --> metadata-extraction-job["metadata-extraction-job"]
  metadata-extraction-job["metadata-extraction-job"] --> claude-bedrock-model["claude-bedrock-model"]
  metadata-extraction-job["metadata-extraction-job"] --> results-spreadsheet-s3["results-spreadsheet-s3"]
  step-functions-workflow["step-functions-workflow"] --> template-comparison-job["template-comparison-job"]
  processed-text-s3["processed-text-s3"] --> template-comparison-job["template-comparison-job"]
  template-knowledge-base["template-knowledge-base"] --> template-comparison-job["template-comparison-job"]
  template-comparison-job["template-comparison-job"] --> claude-bedrock-model["claude-bedrock-model"]
  template-comparison-job["template-comparison-job"] --> results-spreadsheet-s3["results-spreadsheet-s3"]
  template-comparison-job["template-comparison-job"] --> low-similarity-clustering["low-similarity-clustering"]
  results-spreadsheet-s3["results-spreadsheet-s3"] --> human-legal-reviewer["human-legal-reviewer"]
  human-legal-reviewer["human-legal-reviewer"] --> rights-royalties-system["rights-royalties-system"]
  low-similarity-clustering["low-similarity-clustering"] --> results-spreadsheet-s3["results-spreadsheet-s3"]
  low-similarity-clustering["low-similarity-clustering"] --> human-legal-reviewer["human-legal-reviewer"]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
contract-upload-s3 Input S3 bucket for newly uploaded contracts. eventbridge-trigger, pdf-text-preprocessing-job
eventbridge-trigger Starts the Step Functions workflow when new contracts arrive. contract-upload-s3, step-functions-workflow
step-functions-workflow Orchestrates PDF conversion, metadata extraction, template comparison, review, loading, and low-similarity routing. eventbridge-trigger, pdf-text-preprocessing-job, metadata-extraction-job, template-comparison-job, human-legal-reviewer, low-similarity-clustering
pdf-text-preprocessing-job SageMaker Processing job that uses Claude visual reasoning to convert complex PDFs into text. contract-upload-s3, claude-bedrock-model, processed-text-s3
processed-text-s3 S3 storage for raw text outputs and intermediate processed data with source-data access restrictions. pdf-text-preprocessing-job, metadata-extraction-job, template-comparison-job
metadata-extraction-job SageMaker Processing job that extracts pre-specified metadata fields using a schema prompt. processed-text-s3, claude-bedrock-model, results-spreadsheet-s3
template-knowledge-base Amazon Bedrock knowledge base containing possible contract templates and boilerplates. template-comparison-job
template-comparison-job Compares incoming contract text against existing templates and identifies semantic differences. processed-text-s3, template-knowledge-base, claude-bedrock-model, results-spreadsheet-s3, low-similarity-clustering
claude-bedrock-model Anthropic Claude 3.7 Sonnet on Amazon Bedrock used for OCR-like transcription, metadata extraction, and semantic comparison. pdf-text-preprocessing-job, metadata-extraction-job, template-comparison-job
results-spreadsheet-s3 S3 output containing extracted metadata, similar templates, differences, cluster labels, scores, and visualizations. metadata-extraction-job, template-comparison-job, human-legal-reviewer, low-similarity-clustering
human-legal-reviewer Business/legal reviewer who validates outputs and drafts new templates for unmatched contract clusters. results-spreadsheet-s3, rights-royalties-system, low-similarity-clustering
rights-royalties-system Condé Nast internal rights and royalties management system loaded with validated results. human-legal-reviewer
low-similarity-clustering Downstream process that clusters contracts without close template matches for new-template development. step-functions-workflow, template-comparison-job, results-spreadsheet-s3, human-legal-reviewer

Data flow

A user uploads contracts to S3. EventBridge starts the Step Functions workflow. SageMaker Processing converts PDFs to text using Claude 3.7 Sonnet visual reasoning and saves intermediate text to S3 under the same access restrictions. A second SageMaker job extracts schema-defined metadata fields with Claude. A third job compares contract text against templates in a Bedrock knowledge base, identifies semantic differences, and writes spreadsheet results. Human reviewers validate results, Lambda loads valid data to the rights/royalties system, and low-similarity contracts are clustered with similarity scores and visualizations to support new template drafting.

4 supporting quotes
“A user uploads new contracts to an input S3 bucket. The addition of new contracts triggers Amazon EventBridge, which starts the main Step Functions workflow.”article, stated
“The addition of new contracts triggers Amazon EventBridge, which starts the main Step Functions workflow.”article, stated
“using Anthropic’s Claude 3.7 Sonnet in Amazon Bedrock to extract a set of pre-specified metadata fields.”article, stated
“A human reviewer validates the results of the system. Using an AWS Lambda function, valid results are then loaded into Condé Nast’s rights and royalties management system.”article, stated

Why this architecture

The pipeline separates document preprocessing, metadata extraction, template comparison, human validation, rights-system loading, and low-similarity clustering because each stage has different failure modes and review needs. Claude visual reasoning handles complex PDFs, schema prompting constrains metadata extraction, the knowledge base supports template comparison, and humans remain responsible for validation and new-template drafting. Step Functions and S3 provide orchestration and governed intermediate storage.

4 supporting quotes
“focused on parsing, comparison, and data visualization—not providing legal advice of its own.”article, stated
“This step uses the visual reasoning capabilities of Anthropic’s Claude 3.7 Sonnet in Amazon Bedrock to perform the transcription from a PDF (converted to an image) in”article, stated
“The large language model (LLM) is provided a schema through a prompt template”article, stated
“Incoming contracts with low similarity across the templates are sent to a separate S3 bucket”article, stated

Models used: Amazon Bedrock · Anthropic Claude 3.7 Sonnet · Amazon Bedrock Knowledge Bases · AWS Step Functions · Amazon SageMaker Processing · Amazon S3 · Amazon EventBridge · AWS Lambda

Scale

Alternatives considered (roads not taken)

Continue manual rights review and template matching

Rejected because: Manual review was slow, error-prone, and contributed to conservative rights usage and missed revenue opportunities.

“manual, rule-based approach created significant operational bottlenecks.”article, stated
“leading to missed revenue opportunities. Condé Nast needed a modern, efficient solution that could automate contract processing while maintaining the highest standards of accuracy and alignment with regulations.”article, stated

Force low-similarity contracts into existing templates

Rejected because: Low-similarity contracts are routed to clustering and human template creation instead of pretending a poor match is valid.

“contracts with no close template matches from Step 5 are routed to undergo further analysis.”article, stated

Use AI as an autonomous legal advisor

Rejected because: The solution is scoped to parsing, comparison, and visualization, with human legal and business review validating results.

"not providing legal advice of its own. The solution uses the following key services:

— article, stated

Patterns

prompt-chaining (workflow)

The pipeline chains OCR-like transcription, schema extraction, template comparison, and clustering rather than asking one prompt to do all rights analysis.

“A third SageMaker Processing job discovers similar existing templates”article, stated

structured-output-contract (extraction)

Metadata extraction uses a schema prompt containing each field and description.

“provided a schema through a prompt template, consisting of every potential metadata field of interest”article, stated

rag-retrieval (retrieval)

Template comparison searches possible templates stored in an Amazon Bedrock knowledge base.

“possible templates, stored in an Amazon Bedrock knowledge base.”article, stated

human-in-the-loop-gate (legal-review)

Human reviewers validate system results and draft new templates for low-similarity contract clusters.

“A human reviewer uses these results to draft new templates”article, stated

durable-execution (workflow)

AWS Step Functions orchestrates distributed processing stages and downstream routing.

“* AWS Step Functions – A visual workflow service that helps developers use AWS services to build distributed applications, automate processes, orchestrate microservices, and create data and machine learning (ML) pipelines.”article, stated

data-quality-loop (data-foundation)

The project found preprocessing and high-quality representative contracts were essential to downstream extraction and matching accuracy.

“Data preprocessing is foundational”article, stated
“Quality of reference data”article, stated

Tradeoffs

Use AI for parsing/comparison, not legal advice

Chose AI-augmented rights analysis with human validation over fully autonomous legal decisioning.

Rationale: This preserves legal expertise and compliance while automating the bottleneck-heavy parts of contract processing.

“viewing AI as a tool to augment human intelligence rather than replace it entirely.”article, stated

Roll out incrementally

Chose subset of contracts for specific brands over full-scale deployment from the start.

Rationale: Phased rollout enabled rapid iteration and real-world feedback before broader deployment.

“starting with a subset of contracts for specific brands”article, stated

Let subject matter experts drive prompt engineering

Chose plain-English expertise encoded into prompts over traditional software cycles for every rights rule.

Rationale: Experts could express requirements directly to language models, improving accuracy and reducing development complexity.

“subject matter experts drive development through prompt engineering”article, stated
“express requirements in plain English directly to language models”article, stated

Gotchas (what bit them)

Metadata extraction quality depended heavily on preprocessing.

Root cause: Contracts included handwritten notes, scans, multi-column PDFs, large page counts, and specialized formatting.

Resolution: Build advanced preprocessing/OCR with Claude visual reasoning and chunk large documents.

“quality of metadata extraction and subsequent processes heavily depended on the initial contract processing pipeline.”article, stated
“handwritten notes, scanned copies, and multi-column PDFs.”article, stated

AI rights analysis still needed expert review.

Root cause: Nuanced legal and rights cases require human expertise and continuous prompt refinement.

Resolution: Keep human validation and feedback loops in the workflow.

“human evaluation was essential for handling nuanced cases and providing a vital feedback loop for prompt engineering.”article, stated

Template matching depends on representative historical contracts.

Root cause: The system needs diverse examples spanning brands and geographies to compare new contracts accurately.

Resolution: Maintain high-quality contract archives and route low-similarity contracts to cluster-based template development.

“comprehensive set of representative historical contracts spanning multiple brands and geographies”article, stated

Evaluation

The workflow is validated by human review, operational processing-time reduction, improved rights accuracy, reduced rights-violation risk, high-volume scalability, and prompt-refinement feedback from legal and rights experts.

Metrics: processing time reduced from weeks to hours · improved accuracy · risk of rights violations reduced · consistent processing during high-volume periods · human validation results · quality of representative historical contracts

3 supporting quotes
“Improved accuracy”article, stated
“significantly reduced the risk of rights violations and potential legal challenges.”article, stated
“maintaining high accuracy standards.”article, stated

Outcomes

The source reports multiple brands/geographies, hundred-page document handling, high-volume acquisition/expansion periods, and a weeks-to-hours processing-time improvement.

3 supporting quotes
“rights management experts focus on complex cases and strategic initiatives.”article, stated
“without requiring additional human resources.”article, stated
“translates complex rights availability information into plain language for non-technical users”article, stated