AI 代理商進入法律領域的最大瓶頸不是銷售或合規知識——而是 ML 專業知識。傳統上,微調語言模型需要 Python 熟練度、理解訓練超參數、獲得 GPU 基礎設施,以及調試訓練運行的經驗。
大多數代理商不具備這些。他們有自動化工程師、工作流程專家和面向客戶的顧問。聘請 ML 工程師在他們產出任何東西之前要增加 $150K-250K 的薪資。
本文展示如何使用 Ertas Studio 完全繞過 ML 瓶頸,逐步演示從資料準備到部署的完整法律模型微調工作流程。
代理商瓶頸
法律客戶的典型 AI 代理商工作流程如下:
- 客戶需要 AI 驅動的合約審查
- 代理商使用 GPT-4o 構建提示工程解決方案
- 結果不錯,但準確性不足以用於生產環境
- 客戶要求更高準確性和資料隱私
- 代理商意識到他們需要微調和本地部署
- 代理商碰壁——團隊中沒有人知道如何微調模型
此時,代理商要麼:
- 拒絕這個項目(損失收入)
- 外包給 ML 承包商(每個模型 $10K-30K,4-8 週時間線)
- 嘗試從頭學習微調(幾個月的實驗)
這些選項都不可持續。Ertas Studio 提供了第四個選項:為非 ML 團隊專門構建的無代碼微調介面。
演示:微調法律合約審查模型
以下是完整的工作流程,逐步說明。
第 1 步:準備你的訓練資料
法律合約審查的訓練資料來自律所的歷史工作。你需要指令-回應對,其中:
- 指令: 合約條款或部分 + 分析問題
- 回應: 律師的分析、風險評估或擷取的資訊
範例:
{
"instruction": "Review the following indemnification clause and assess risk level:\n\n'Tenant shall indemnify and hold harmless Landlord from and against any and all claims, damages, losses, costs and expenses (including reasonable attorneys' fees) arising out of or in connection with Tenant's use of the Premises, except to the extent caused by Landlord's gross negligence or willful misconduct.'",
"response": "Risk Level: MODERATE\n\nAnalysis: This is a standard one-way indemnification clause favouring the landlord. The carve-out for landlord's gross negligence/willful misconduct provides some protection, but the clause is broader than ideal. Key concerns:\n1. 'Any and all claims' is very broad — consider narrowing to claims arising from tenant's negligence\n2. No cap on indemnification liability\n3. Includes attorneys' fees which could be significant\n\nRecommendation: Negotiate to add mutual indemnification and a liability cap tied to the lease value."
}資料要求:
- 最低: 500 個範例(用於基本模型)
- 推薦: 2,000-3,000 個範例(用於生產品質)
- 格式: JSONL(每行一個 JSON 物件)
資料來源:
- 從文件管理系統匯出(iManage、NetDocuments)
- 將律師注釋和評論轉換為結構化配對
- 使用歷史審查備忘錄作為回應模板
第 2 步:上傳到 Ertas Studio
在 Ertas Studio 中:
- 創建新項目並命名(例如「Acme Legal - Contract Review」)
- 上傳你的 JSONL 訓練文件
- Studio 自動驗證格式並顯示你範例的預覽
- 查看資料統計——回應長度分佈、指令類別
Studio 標記潛在的資料品質問題:重複條目、極短的回應、格式不一致。在繼續之前修復這些問題。
第 3 步:配置訓練
Studio 呈現帶有合理預設值的訓練配置:
| 參數 | 預設值 | 含義 |
|---|---|---|
| 基礎模型 | Llama 3.1 8B | 要微調的基礎模型 |
| 適配器類型 | LoRA | 訓練小型適配器,而不是完整模型 |
| LoRA rank | 16 |

