← Back to Gene Catalog

contract-revision-advisor

Hybrid legal.contract

基于知识库与 LLM 的合同条款级审查;支持宿主注入的法规焦点摘录、变更优先审查模式;长文本分段送审与分段后汇总去重及失败原因。

README

No documentation yet.

Gene authors can add a README when publishing.

Phenotype

Input

PropertyType Req Description
apiKeys object
chunkSize number
knowledge object 四类知识库至少一类非空(由基因逻辑校验)
partyRole string
focusAreas array
reviewScope full | delta 默认 full;delta 时优先针对 changeSummary 审查
chunkOverlap number
contractText string 待审全文(合同、单方文书或非诉专业文书)
documentKind contract | unilateral_compliance | non_litigation_professional contract=合同/协议;unilateral_compliance=单方文书;non_litigation_professional=非诉专业文书/制度
changeSummary string 与 reviewScope=delta 配合:本轮变更说明
chunkedReview boolean
contractTitle string
documentSubtype string 文书细分:unilateral 时如遗嘱、授权委托书;non_litigation 时如法律意见书、尽调报告、制度规范(反洗钱)等
sessionFeedback string
maxCharsSinglePass number
priorLearningContext string
chunkConsolidationPass boolean 默认 true。分段审查且段数>1 时是否再调用一次模型做汇总去重
knowledgeFocusExcerpts string 可选。宿主根据 confirmed 名称从法规/案例库检索匹配的摘录文本
confirmedKnowledgeFocus array 可选。用户在长知识库预警流程中确认的法规/要点名称

Output

PropertyType Req
disclaimer string
riskSummary string
chunkReviewMeta object
checklistForOwner array
revisionSuggestions array
learningContextForNextCall string
Raw JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "knowledge",
    "contractText",
    "apiKeys"
  ],
  "properties": {
    "apiKeys": {
      "type": "object",
      "required": [
        "llm"
      ],
      "properties": {
        "llm": {
          "type": "object",
          "required": [
            "apiKey"
          ],
          "properties": {
            "model": {
              "type": "string"
            },
            "apiKey": {
              "type": "string"
            },
            "baseUrl": {
              "type": "string"
            },
            "provider": {
              "enum": [
                "deepseek",
                "openai",
                "anthropic"
              ],
              "type": "string"
            }
          }
        }
      }
    },
    "chunkSize": {
      "type": "number"
    },
    "knowledge": {
      "type": "object",
      "properties": {
        "laws": {
          "type": "string"
        },
        "cases": {
          "type": "string"
        },
        "revisionSamples": {
          "type": "string"
        },
        "contractTemplates": {
          "type": "string"
        }
      },
      "description": "四类知识库至少一类非空(由基因逻辑校验)"
    },
    "partyRole": {
      "type": "string"
    },
    "focusAreas": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "reviewScope": {
      "enum": [
        "full",
        "delta"
      ],
      "type": "string",
      "description": "默认 full;delta 时优先针对 changeSummary 审查"
    },
    "chunkOverlap": {
      "type": "number"
    },
    "contractText": {
      "type": "string",
      "description": "待审全文(合同、单方文书或非诉专业文书)"
    },
    "documentKind": {
      "enum": [
        "contract",
        "unilateral_compliance",
        "non_litigation_professional"
      ],
      "type": "string",
      "description": "contract=合同/协议;unilateral_compliance=单方文书;non_litigation_professional=非诉专业文书/制度"
    },
    "changeSummary": {
      "type": "string",
      "description": "与 reviewScope=delta 配合:本轮变更说明"
    },
    "chunkedReview": {
      "type": "boolean"
    },
    "contractTitle": {
      "type": "string"
    },
    "documentSubtype": {
      "type": "string",
      "description": "文书细分:unilateral 时如遗嘱、授权委托书;non_litigation 时如法律意见书、尽调报告、制度规范(反洗钱)等"
    },
    "sessionFeedback": {
      "type": "string"
    },
    "maxCharsSinglePass": {
      "type": "number"
    },
    "priorLearningContext": {
      "type": "string"
    },
    "chunkConsolidationPass": {
      "type": "boolean",
      "description": "默认 true。分段审查且段数>1 时是否再调用一次模型做汇总去重"
    },
    "knowledgeFocusExcerpts": {
      "type": "string",
      "description": "可选。宿主根据 confirmed 名称从法规/案例库检索匹配的摘录文本"
    },
    "confirmedKnowledgeFocus": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "可选。用户在长知识库预警流程中确认的法规/要点名称"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "revisionSuggestions",
    "riskSummary",
    "checklistForOwner",
    "learningContextForNextCall",
    "disclaimer"
  ],
  "properties": {
    "disclaimer": {
      "type": "string"
    },
    "riskSummary": {
      "type": "string"
    },
    "chunkReviewMeta": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "chunkSize": {
          "type": "number"
        },
        "chunkCount": {
          "type": "number"
        },
        "consolidationError": {
          "type": "string"
        },
        "maxCharsSinglePass": {
          "type": "number"
        },
        "consolidationApplied": {
          "type": "boolean",
          "description": "是否已执行分段后的汇总去重"
        },
        "consolidationSkippedReason": {
          "type": "string"
        }
      }
    },
    "checklistForOwner": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "revisionSuggestions": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "basis": {
            "type": "string"
          },
          "issue": {
            "type": "string"
          },
          "clauseRef": {
            "type": "string"
          },
          "riskLevel": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "suggestion": {
            "type": "string"
          },
          "originalExcerpt": {
            "type": "string"
          },
          "suggestedRedline": {
            "type": "string"
          }
        }
      }
    },
    "learningContextForNextCall": {
      "type": "string"
    }
  }
}

Arena History

Date Fitness Safety Calls
Mar 30 0.5000 1.00 1