Lý thuyết
55 phút
Bài 6/15

Contract Analysis

Sử dụng AI để phân tích hợp đồng - key terms, risks, và comparisons

Contract Analysis với AI

Phân tích hợp đồng là một trong những use cases high-value nhất của Document AI. AI có thể review contracts trong phút thay vì giờ.

🎯 Mục tiêu bài học

  • Hiểu contract analysis workflow
  • Sử dụng AI để extract key terms
  • Identify risks và unusual clauses
  • Compare contracts với templates

📋 Contract Analysis Use Cases

Business Impact

ScenarioManualWith AIValue
Review vendor contract4 hours30 min$500 saved
Compare 10 lease offers2 days2 hoursFaster decision
Due diligence (50 contracts)2 weeks3 daysDeal speed
Compliance audit1 month1 weekReduced risk

Case Study: M&A deal với 500+ contracts. Traditional: 3 lawyers × 4 weeks = 150,000.WithAI:1lawyer×1week+AI=150,000. With AI: 1 lawyer × 1 week + AI = 40,000. Savings: $110,000.

Who Benefits?

Text
1📋 Legal Teams:
2 • Faster contract review
3 • Consistent analysis
4 • Risk identification
5
6💼 Procurement:
7 • Compare vendor terms
8 • Negotiate better deals
9 • Track obligations
10
11🏢 Operations:
12 • Manage renewals
13 • Ensure compliance
14 • Track commitments
15
16💰 Finance:
17 • Understand liabilities
18 • Audit contracts
19 • Revenue recognition

🔍 What AI Can Extract from Contracts

Standard Extractions

Text
1┌─────────────────────────────────────┐
2│ CONTRACT METADATA │
3├─────────────────────────────────────┤
4│ • Contract type (NDA, MSA, SOW...) │
5│ • Parties involved │
6│ • Effective date │
7│ • Expiration/renewal date │
8│ • Governing law │
9│ • Contract value │
10└─────────────────────────────────────┘
11
12┌─────────────────────────────────────┐
13│ KEY TERMS │
14├─────────────────────────────────────┤
15│ • Payment terms │
16│ • Termination clauses │
17│ • Liability limits │
18│ • Indemnification │
19│ • Confidentiality scope │
20│ • IP ownership │
21│ • Non-compete/non-solicit │
22│ • Force majeure │
23│ • Dispute resolution │
24└─────────────────────────────────────┘
25
26┌─────────────────────────────────────┐
27│ OBLIGATIONS & DEADLINES │
28├─────────────────────────────────────┤
29│ • Deliverables & timelines │
30│ • Reporting requirements │
31│ • Audit rights │
32│ • Insurance requirements │
33│ • Compliance obligations │
34└─────────────────────────────────────┘

Risk Identification

Text
1🔴 HIGH RISK:
2├── Unlimited liability
3├── One-sided indemnification
4├── Auto-renewal without notice
5├── Exclusive dealing clauses
6├── Unusual IP transfers
7└── Broad confidentiality (>5 years)
8
9🟡 MEDIUM RISK:
10├── Short termination notice
11├── Unclear payment terms
12├── Vague scope of work
13├── Missing SLAs
14└── Broad change of control
15
16🟢 LOW RISK:
17├── Standard payment terms
18├── Mutual confidentiality
19├── Clear termination rights
20└── Reasonable liability caps

🛠️ Tools for Contract Analysis

1. Claude - Best for Deep Analysis

Why Claude?

  • 200K token context (entire contracts)
  • Strong reasoning about legal language
  • Good at comparisons

Sample Prompts:

markdown
1# Basic Analysis
2"Analyze this contract and provide:
31. Summary (3 sentences)
42. Key terms in table format
53. Important dates and deadlines
64. Potential risks or concerns
75. Unusual or non-standard clauses"
8
9# Risk Assessment
10"Review this contract for risks. For each risk found:
11- Describe the risk
12- Quote the relevant clause
13- Rate severity (High/Medium/Low)
14- Suggest mitigation or negotiation points"
15
16# Comparison
17"Compare these two contracts:
18- Contract A: [paste or reference]
19- Contract B: [paste or reference]
20
21Highlight differences in:
22- Payment terms
23- Liability
24- Termination rights
25- Scope of work"

2. ChatGPT + Code Interpreter

Best for: Batch processing, structured output

Python
1# Upload multiple contracts, ask:
2"Process all uploaded contracts and create
3a comparison table with columns:
4- Contract name
5- Parties
6- Value
7- Term length
8- Auto-renewal (Y/N)
9- Termination notice period
10- Liability cap
11
12Export as CSV."

3. Spellbook (Legal-Specific)

Features:

  • Built for legal professionals
  • Pre-trained on legal language
  • Clause library
  • Redlining suggestions
Text
1Pricing: ~$500/month
2Best for: Law firms, legal departments

4. Kira Systems (Enterprise)

Features:

  • 1000+ pre-built extraction models
  • Custom model training
  • Due diligence workflows
  • Integration với DMS
Text
1Pricing: Enterprise (custom)
2Best for: Large firms, M&A

5. Luminance (AI Due Diligence)

Features:

  • Automatic contract reading
  • Anomaly detection
  • Multi-language support
  • Secure data rooms
Text
1Pricing: Enterprise (custom)
2Best for: M&A, compliance

📝 Contract Analysis Workflow

Step 1: Upload & Classify

Text
1┌─────────────────────────────────────┐
2│ UPLOAD CONTRACT │
3└─────────────────┬───────────────────┘
4
5
6┌─────────────────────────────────────┐
7│ AI CLASSIFICATION │
8│ │
9│ Type: Master Service Agreement │
10│ Industry: Technology │
11│ Complexity: Medium │
12│ Pages: 24 │
13│ Language: English │
14└─────────────────┬───────────────────┘
15
16
17 Select Analysis Type

Step 2: Extract Key Information

Prompt Template:

markdown
1You are a contract analyst. Review the attached contract
2and extract the following information in JSON format:
3
4{
5 "metadata": {
6 "contract_type": "",
7 "parties": {
8 "party_a": "",
9 "party_b": ""
10 },
11 "effective_date": "",
12 "expiration_date": "",
13 "governing_law": "",
14 "total_value": ""
15 },
16 "key_terms": {
17 "payment_terms": "",
18 "termination_notice": "",
19 "auto_renewal": true/false,
20 "liability_cap": "",
21 "indemnification": ""
22 },
23 "obligations": [
24 {
25 "party": "",
26 "obligation": "",
27 "deadline": ""
28 }
29 ],
30 "risks": [
31 {
32 "description": "",
33 "clause_reference": "",
34 "severity": "high/medium/low",
35 "recommendation": ""
36 }
37 ]
38}

Step 3: Risk Analysis

Detailed Risk Prompt:

markdown
1Analyze this contract for risks and unusual terms.
2
3For each finding, provide:
4
5## Risk [Number]: [Title]
6
7**Severity**: 🔴 High / 🟡 Medium / 🟢 Low
8
9**Clause**:
10> [Quote exact language from contract]
11
12**Section Reference**: Section X.X, Page Y
13
14**Issue**:
15[Explain why this is concerning]
16
17**Market Standard**:
18[What's typical in similar contracts]
19
20**Recommendation**:
21[Suggested negotiation point or mitigation]
22
23---
24
25Focus areas:
261. Liability and indemnification
272. Termination rights
283. IP ownership
294. Confidentiality scope
305. Payment and penalties
316. Change of control
327. Assignment rights
338. Force majeure
349. Dispute resolution
3510. Regulatory compliance

Step 4: Compare với Standard

markdown
1Compare this contract against our standard template.
2
3Highlight:
41. ✅ Terms that match our standard
52. ⚠️ Terms that deviate (explain deviation)
63. ❌ Missing standard terms
74. 🆕 Additional terms not in our standard
8
9For each deviation:
10- Is it acceptable? (Yes/No/Negotiate)
11- Suggested response

📊 Practical Examples

Example 1: NDA Review

Input: Standard mutual NDA

AI Output:

markdown
1## NDA Summary
2
3**Parties**: ABC Corp ↔ XYZ Inc
4**Type**: Mutual Non-Disclosure Agreement
5**Term**: 3 years from effective date
6**Governing Law**: State of California
7
8### Key Terms
9
10| Term | Our Position | Their Position | Status |
11|------|--------------|----------------|--------|
12| Confidentiality period | 3 years | 5 years | ⚠️ Negotiate |
13| Definition scope | Standard | Broad (includes "ideas") | ⚠️ Narrow |
14| Permitted disclosures | Employees only | Employees + contractors | ✅ OK |
15| Return of materials | 30 days | 10 days | ✅ OK |
16
17### Risks Identified
18
19🟡 **Medium Risk**: Confidentiality extends to "ideas and concepts"
20- Section 1.1, Page 1
21- Recommendation: Narrow to "documented information"
22
23🟢 **Low Risk**: Slightly longer term than standard
24- Our standard: 3 years, Theirs: 5 years
25- Acceptable for non-sensitive matters

Example 2: Vendor Contract

Input: SaaS subscription agreement

AI Output:

markdown
1## Vendor Agreement Analysis
2
3### Financial Terms
4- Annual fee: $50,000
5- Payment: Net 30
6- Auto-renewal: YES ⚠️ (60 days notice required)
7- Price increase cap: None specified ⚠️
8
9### Service Levels
10- Uptime SLA: 99.5% ✅
11- Support response: 24 hours (business days)
12- Credits for downtime: Yes, prorated
13
14### Risks
15
16🔴 **HIGH RISK**: Unlimited price increases
17> "Pricing for renewal terms may be adjusted by Provider
18> at its discretion upon 30 days written notice."
19
20**Recommendation**: Negotiate cap (e.g., max 5% annual increase)
21
22🔴 **HIGH RISK**: Data handling unclear
23- No mention of data ownership
24- No deletion upon termination clause
25- No audit rights
26
27**Recommendation**: Add data processing addendum
28
29🟡 **MEDIUM RISK**: Liability cap = 12 months fees
30- Our standard: Unlimited for data breach
31- Their position: Capped at $50,000
32
33**Recommendation**: Negotiate carve-out for data breaches

Example 3: Employment Contract

Input: Executive employment agreement

AI Output:

markdown
1## Employment Agreement Review
2
3### Compensation Package
4| Component | Value | Vesting |
5|-----------|-------|---------|
6| Base Salary | $200,000 | Monthly |
7| Signing Bonus | $30,000 | Immediate |
8| Equity | 50,000 options | 4yr/1yr cliff |
9| Annual Bonus | Up to 30% | Performance-based |
10
11### Key Protections
12
13**For Employee**:
14✅ Severance: 6 months if terminated without cause
15✅ Acceleration: 50% equity on change of control
16✅ Notice period: 30 days from employer
17
18**For Company**:
19✅ Non-compete: 12 months, same industry
20✅ Non-solicit: 18 months, employees & clients
21✅ IP assignment: All work product
22
23### Issues to Address
24
25🟡 Non-compete geographic scope undefined
26- Currently: Nationwide
27- Recommend: Limit to markets where employed
28
29🟡 Bonus criteria not specified
30- "At discretion of Board"
31- Recommend: Define measurable targets
32
33✅ Equity cliff reasonable (1 year)
34✅ IP assignment has carve-out for prior work

🔄 Automation: Contract Review Pipeline

Make.com Workflow

Text
1Trigger: New contract uploaded to Dropbox/Drive
2
3Module 1: Download file
4Module 2: Convert to text (if needed)
5Module 3: Send to Claude API
6 Prompt: [Contract analysis template]
7Module 4: Parse JSON response
8Module 5: Create row in Airtable:
9 - Contract metadata
10 - Key terms
11 - Risk summary
12Module 6: IF high_risk_count > 0:
13 - Send Slack alert
14 - Create task for legal review
15Module 7: Generate summary PDF
16Module 8: Email stakeholders

Airtable Contract Database

Text
1Table: Contracts
2
3Fields:
4├── Contract Name (text)
5├── Type (single select)
6├── Parties (linked)
7├── Status (single select)
8├── Effective Date (date)
9├── Expiration Date (date)
10├── Value (currency)
11├── Auto-Renewal (checkbox)
12├── Renewal Notice Days (number)
13├── Risk Score (formula)
14├── Key Terms (long text)
15├── AI Summary (long text)
16├── Original File (attachment)
17└── Assigned To (user)
18
19Views:
20├── All Contracts
21├── Expiring Soon (next 90 days)
22├── High Risk
23├── Pending Review
24└── By Department

⚠️ Limitations & Best Practices

AI Limitations

Text
1❌ AI cannot provide legal advice
2❌ May miss context-specific issues
3❌ Doesn't understand business priorities
4❌ Can hallucinate clause interpretations
5❌ May not catch subtle legal nuances

Best Practices

Text
1✅ Always have lawyer review high-value contracts
2✅ Use AI for first-pass screening
3✅ Verify AI extractions against source
4✅ Build clause library for consistency
5✅ Train team on AI output interpretation
6✅ Keep human in the loop for decisions

Disclaimer: AI contract analysis is a tool to assist, not replace, legal review. For significant contracts or legal matters, always consult qualified legal counsel.

🎯 Bài tập thực hành

Task 1: NDA Analysis (20 phút)

Text
11. Find a sample NDA online (or use company template)
22. Upload to Claude
33. Use the analysis prompt provided
44. Review output for accuracy
55. Identify any missed items

Task 2: Risk Assessment (30 phút)

Text
11. Take a vendor/service agreement
22. Run risk analysis prompt
33. Categorize risks: High/Medium/Low
44. Write negotiation recommendations
55. Create summary for stakeholders

Task 3: Build Comparison Table (30 phút)

Text
11. Gather 3 similar contracts (e.g., vendor agreements)
22. Create extraction template
33. Run through Claude
44. Build comparison spreadsheet
55. Identify best/worst terms across contracts

📚 Tổng kết

ConceptKey Takeaway
ExtractionAI can extract 90%+ of key terms accurately
Risk AnalysisFlag unusual clauses, compare to standards
ComparisonQuickly compare multiple contracts
LimitationsAI assists, doesn't replace legal review
WorkflowAutomate first-pass, human reviews flagged items

Tiếp theo: Bài 07 - Invoice Processing - Tự động hóa xử lý hóa đơn và validation!