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
| Scenario | Manual | With AI | Value |
|---|---|---|---|
| Review vendor contract | 4 hours | 30 min | $500 saved |
| Compare 10 lease offers | 2 days | 2 hours | Faster decision |
| Due diligence (50 contracts) | 2 weeks | 3 days | Deal speed |
| Compliance audit | 1 month | 1 week | Reduced risk |
Case Study: M&A deal với 500+ contracts. Traditional: 3 lawyers × 4 weeks = 40,000. Savings: $110,000.
Who Benefits?
1📋 Legal Teams:2 • Faster contract review3 • Consistent analysis4 • Risk identification5 6💼 Procurement:7 • Compare vendor terms8 • Negotiate better deals9 • Track obligations10 11🏢 Operations:12 • Manage renewals13 • Ensure compliance14 • Track commitments15 16💰 Finance:17 • Understand liabilities18 • Audit contracts19 • Revenue recognition🔍 What AI Can Extract from Contracts
Standard Extractions
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
1🔴 HIGH RISK:2├── Unlimited liability3├── One-sided indemnification4├── Auto-renewal without notice5├── Exclusive dealing clauses6├── Unusual IP transfers7└── Broad confidentiality (>5 years)8 9🟡 MEDIUM RISK:10├── Short termination notice11├── Unclear payment terms12├── Vague scope of work13├── Missing SLAs14└── Broad change of control15 16🟢 LOW RISK:17├── Standard payment terms18├── Mutual confidentiality19├── Clear termination rights20└── 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:
1# Basic Analysis2"Analyze this contract and provide:31. Summary (3 sentences)42. Key terms in table format53. Important dates and deadlines64. Potential risks or concerns75. Unusual or non-standard clauses"8 9# Risk Assessment10"Review this contract for risks. For each risk found:11- Describe the risk12- Quote the relevant clause13- Rate severity (High/Medium/Low)14- Suggest mitigation or negotiation points"15 16# Comparison17"Compare these two contracts:18- Contract A: [paste or reference]19- Contract B: [paste or reference]20 21Highlight differences in:22- Payment terms23- Liability24- Termination rights25- Scope of work"2. ChatGPT + Code Interpreter
Best for: Batch processing, structured output
1# Upload multiple contracts, ask:2"Process all uploaded contracts and create 3a comparison table with columns:4- Contract name5- Parties6- Value7- Term length8- Auto-renewal (Y/N)9- Termination notice period10- Liability cap1112Export as CSV."3. Spellbook (Legal-Specific)
Features:
- Built for legal professionals
- Pre-trained on legal language
- Clause library
- Redlining suggestions
1Pricing: ~$500/month2Best for: Law firms, legal departments4. Kira Systems (Enterprise)
Features:
- 1000+ pre-built extraction models
- Custom model training
- Due diligence workflows
- Integration với DMS
1Pricing: Enterprise (custom)2Best for: Large firms, M&A5. Luminance (AI Due Diligence)
Features:
- Automatic contract reading
- Anomaly detection
- Multi-language support
- Secure data rooms
1Pricing: Enterprise (custom)2Best for: M&A, compliance📝 Contract Analysis Workflow
Step 1: Upload & Classify
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 TypeStep 2: Extract Key Information
Prompt Template:
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:
1Analyze this contract for risks and unusual terms.2 3For each finding, provide:4 5## Risk [Number]: [Title]6 7**Severity**: 🔴 High / 🟡 Medium / 🟢 Low8 9**Clause**: 10> [Quote exact language from contract]11 12**Section Reference**: Section X.X, Page Y13 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 indemnification272. Termination rights283. IP ownership294. Confidentiality scope305. Payment and penalties316. Change of control327. Assignment rights338. Force majeure349. Dispute resolution3510. Regulatory complianceStep 4: Compare với Standard
1Compare this contract against our standard template.2 3Highlight:41. ✅ Terms that match our standard52. ⚠️ Terms that deviate (explain deviation)63. ❌ Missing standard terms74. 🆕 Additional terms not in our standard8 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:
1## NDA Summary2 3**Parties**: ABC Corp ↔ XYZ Inc4**Type**: Mutual Non-Disclosure Agreement5**Term**: 3 years from effective date6**Governing Law**: State of California7 8### Key Terms9 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 Identified18 19🟡 **Medium Risk**: Confidentiality extends to "ideas and concepts"20- Section 1.1, Page 121- Recommendation: Narrow to "documented information"22 23🟢 **Low Risk**: Slightly longer term than standard24- Our standard: 3 years, Theirs: 5 years25- Acceptable for non-sensitive mattersExample 2: Vendor Contract
Input: SaaS subscription agreement
AI Output:
1## Vendor Agreement Analysis2 3### Financial Terms4- Annual fee: $50,0005- Payment: Net 306- Auto-renewal: YES ⚠️ (60 days notice required)7- Price increase cap: None specified ⚠️8 9### Service Levels10- Uptime SLA: 99.5% ✅11- Support response: 24 hours (business days)12- Credits for downtime: Yes, prorated13 14### Risks15 16🔴 **HIGH RISK**: Unlimited price increases17> "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 unclear23- No mention of data ownership24- No deletion upon termination clause25- No audit rights26 27**Recommendation**: Add data processing addendum28 29🟡 **MEDIUM RISK**: Liability cap = 12 months fees30- Our standard: Unlimited for data breach31- Their position: Capped at $50,00032 33**Recommendation**: Negotiate carve-out for data breachesExample 3: Employment Contract
Input: Executive employment agreement
AI Output:
1## Employment Agreement Review2 3### Compensation Package4| 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 Protections12 13**For Employee**:14✅ Severance: 6 months if terminated without cause15✅ Acceleration: 50% equity on change of control16✅ Notice period: 30 days from employer17 18**For Company**:19✅ Non-compete: 12 months, same industry20✅ Non-solicit: 18 months, employees & clients21✅ IP assignment: All work product22 23### Issues to Address24 25🟡 Non-compete geographic scope undefined26- Currently: Nationwide27- Recommend: Limit to markets where employed28 29🟡 Bonus criteria not specified30- "At discretion of Board"31- Recommend: Define measurable targets32 33✅ Equity cliff reasonable (1 year)34✅ IP assignment has carve-out for prior work🔄 Automation: Contract Review Pipeline
Make.com Workflow
1Trigger: New contract uploaded to Dropbox/Drive2 3Module 1: Download file4Module 2: Convert to text (if needed)5Module 3: Send to Claude API6 Prompt: [Contract analysis template]7Module 4: Parse JSON response8Module 5: Create row in Airtable:9 - Contract metadata10 - Key terms11 - Risk summary12Module 6: IF high_risk_count > 0:13 - Send Slack alert14 - Create task for legal review15Module 7: Generate summary PDF16Module 8: Email stakeholdersAirtable Contract Database
1Table: Contracts2 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 Contracts21├── Expiring Soon (next 90 days)22├── High Risk23├── Pending Review24└── By Department⚠️ Limitations & Best Practices
AI Limitations
1❌ AI cannot provide legal advice2❌ May miss context-specific issues3❌ Doesn't understand business priorities4❌ Can hallucinate clause interpretations5❌ May not catch subtle legal nuancesBest Practices
1✅ Always have lawyer review high-value contracts2✅ Use AI for first-pass screening3✅ Verify AI extractions against source4✅ Build clause library for consistency5✅ Train team on AI output interpretation6✅ Keep human in the loop for decisionsDisclaimer: 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)
11. Find a sample NDA online (or use company template)22. Upload to Claude33. Use the analysis prompt provided44. Review output for accuracy55. Identify any missed itemsTask 2: Risk Assessment (30 phút)
11. Take a vendor/service agreement22. Run risk analysis prompt33. Categorize risks: High/Medium/Low44. Write negotiation recommendations55. Create summary for stakeholdersTask 3: Build Comparison Table (30 phút)
11. Gather 3 similar contracts (e.g., vendor agreements)22. Create extraction template33. Run through Claude44. Build comparison spreadsheet55. Identify best/worst terms across contracts📚 Tổng kết
| Concept | Key Takeaway |
|---|---|
| Extraction | AI can extract 90%+ of key terms accurately |
| Risk Analysis | Flag unusual clauses, compare to standards |
| Comparison | Quickly compare multiple contracts |
| Limitations | AI assists, doesn't replace legal review |
| Workflow | Automate 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!
