法律合約資料集 Template

    用於訓練合約分析和條款提取 AI 模型的法律文件資料集範本

    Classification

    Overview

    法律合約審查資料集訓練 AI 模型分析合約,包括識別特定條款類型、標記潛在風險條款、提取關鍵條款,以及根據法律功能分類合約章節。這些資料集使組織能夠自動化合約的初步分類,減少律師花在例行文件審查上的時間,同時確保高風險條款得到適當的人工關注。

    資料集結構必須反映法律文件的層級性質。合約包含章節、條款和子條款,每個都服務於特定的法律目的。訓練資料應包含常見條款類型的範例——責任限制、賠償、終止、保密、準據法、轉讓、不可抗力和智慧財產權條款。每個條款都應標記其類型、風險等級(標準、有利、不利、缺失),以及任何具體關切,例如單方面的賠償義務或異常寬泛的競業禁止條款。

    合約審查 AI 對訓練資料品質特別敏感,因為錯誤可能造成嚴重的法律和財務後果。資料集必須由理解合約語言細微差異的合格法律專業人士審查。上下文至關重要——相同的條款措辭在一種類型的協議中可能是標準的,在另一種中則可能非常不尋常。訓練資料應涵蓋多種合約類型(保密協議、服務協議、僱傭合約、授權協議、合夥協議),以確保模型能在不同文件類別之間適當地泛化。

    Dataset Schema

    typescript
    interface ContractClauseExample {
      instruction: string;
      input: string;       // The contract clause or section text
      output: string;      // Classification, risk assessment, or extraction result
      metadata: {
        contract_type: "NDA" | "MSA" | "SaaS" | "Employment" | "License" | "Partnership";
        clause_type: string;
        risk_level: "standard" | "favorable" | "unfavorable" | "critical";
        jurisdiction: string;
      };
    }
    法律合約審查訓練範例的結構定義,包含條款元資料

    Sample Data

    json
    [
      {
        "instruction": "Classify the following contract clause and assess its risk level for the receiving party.",
        "input": "The Receiving Party shall indemnify, defend, and hold harmless the Disclosing Party from and against any and all claims, damages, losses, costs, and expenses (including reasonable attorneys' fees) arising from or related to any breach of this Agreement by the Receiving Party, including but not limited to any unauthorized disclosure or use of Confidential Information.",
        "output": "Clause Type: Indemnification\nRisk Level: Standard\n\nAnalysis: This is a standard one-way indemnification clause in an NDA context. The Receiving Party indemnifies the Disclosing Party for breaches of confidentiality obligations. The scope is reasonable — it covers damages arising from breach of the agreement, specifically unauthorized disclosure. The inclusion of attorneys' fees is standard. No unusual or overly broad provisions detected.\n\nRecommendation: Acceptable as-is for standard NDA.",
        "metadata": {
          "contract_type": "NDA",
          "clause_type": "indemnification",
          "risk_level": "standard",
          "jurisdiction": "US-General"
        }
      },
      {
        "instruction": "Identify any concerning provisions in this limitation of liability clause.",
        "input": "IN NO EVENT SHALL PROVIDER BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, REGARDLESS OF THE CAUSE OF ACTION OR THE THEORY OF LIABILITY. PROVIDER'S TOTAL AGGREGATE LIABILITY UNDER THIS AGREEMENT SHALL NOT EXCEED THE FEES PAID BY CUSTOMER IN THE TWELVE (12) MONTH PERIOD IMMEDIATELY PRECEDING THE EVENT GIVING RISE TO THE CLAIM. THIS LIMITATION SHALL APPLY NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.",
        "output": "Clause Type: Limitation of Liability\nRisk Level: Unfavorable (for Customer)\n\nConcerns Identified:\n1. **No carve-outs**: The limitation applies universally with no exceptions for gross negligence, willful misconduct, IP infringement, or confidentiality breaches. Industry standard is to carve out at least IP indemnification and confidentiality obligations.\n2. **Low liability cap**: 12-month trailing fees may be insufficient for enterprise agreements. Consider negotiating 24-month or a fixed dollar floor.\n3. **Failure of essential purpose language**: The final sentence attempts to preserve the limitation even when a remedy fails its essential purpose, which may be unenforceable in some jurisdictions but signals aggressive positioning.\n\nRecommendation: Negotiate carve-outs for IP, confidentiality, and data breach. Consider a higher liability cap or a super-cap for critical obligations.",
        "metadata": {
          "contract_type": "SaaS",
          "clause_type": "limitation-of-liability",
          "risk_level": "unfavorable",
          "jurisdiction": "US-General"
        }
      }
    ]
    展示條款分類與風險評估的法律合約審查範例

    Data Collection Guide

    從您組織的歷史合約審查備忘錄、修改標記評論和條款庫取得訓練資料。法律團隊通常維護已核准條款語言的資料庫、談判操作手冊和風險評估範本——這些都是訓練範例的優秀來源。將條款庫條目轉換為指令-回應對,其中指令要求模型分類或評估條款,輸出提供初級律師會產出的分析。

    個資遮蔽對法律訓練資料至關重要。合約文字包含當事人姓名、地址、財務條款和其他機密商業資訊。使用 Ertas Data Suite 的個資遮蔽功能,將公司名稱替換為通用佔位符(甲方、乙方),遮蔽具體金額同時保留相對大小,並移除地址和聯絡資訊。在移除識別資訊的同時保留條款結構和法律術語。

    聘請執業律師審查和驗證訓練範例,特別是風險評估。「標準」與「不利」條款之間的差異通常取決於上下文、管轄區和交易動態,需要法律專業知識才能評估。計畫每個範例至少有兩位律師審查者以建立一致的品質標準,並透過資深律師的審查解決分歧。

    Quality Criteria

    法律準確性是最重要的品質標準。訓練資料中的每個風險評估、條款分類和建議都必須在法律上是正確的。請合格律師驗證條款類型是否正確識別、風險等級是否準確反映當事人的風險敞口,以及建議是否符合合理的法律實務。訓練資料中不正確的法律分析將產生一個給出危險錯誤建議的模型。

    確保跨合約類型、條款類型和管轄區的覆蓋範圍。資料集應至少包含 5-6 種合約類型的範例,涵蓋所有常見條款類別(10-15 種類型)的代表。包含良好撰寫和拙劣撰寫的條款範例——模型需要將拙劣撰寫識別為風險因素。包含缺失條款的範例(識別合約缺少標準條款),因為這是合約審查 AI 最有價值的能力之一。

    驗證各範例的輸出格式是否一致。每個分析都應遵循相同的結構(條款類型、風險等級、分析、建議),以訓練模型產出可預測且可解析的輸出。測試模型的輸出是否能整合到期望結構化風險評估的下游法律工作流程工具中。

    Using This Template with Ertas

    將合約文字匯入 Ertas Data Suite 進行個資遮蔽,移除當事人姓名、財務條款和其他機密細節,同時保留法律語言和條款結構。資料血統追蹤功能記錄每次遮蔽,提供法律合規團隊所需的稽核軌跡。以 Alpaca 或 JSONL 格式匯出清理後的資料集進行微調。

    地端部署架構對法律資料尤為重要,因為這些資料通常受律師-客戶特權和嚴格保密義務的約束。透過 Ertas Data Suite 的隔離環境處理合約文字,確保受特權保護的資訊在整個資料集準備過程中永遠不會離開您組織的基礎設施。

    Recommended Model

    法律合約審查受益於能夠處理風險評估所需複雜推理的較大模型。建議從 13B-14B 參數的模型開始,例如 Llama 3.1 14B,以獲得更細膩的分析。對於較簡單的條款分類任務(識別條款類型而不進行風險評估),7B-8B 模型可提供足夠的效能,並具有更快的推論速度。

    考慮在監督式微調之前,先在大型法律文字語料庫上進行領域自適應預訓練。在通用文字上預訓練的模型可能會在法律術語、引用格式和合約中常見的複雜句型結構上遇到困難。

    Related Resources

    Ship AI that runs on your users' devices.

    Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.