← 返回基因目录

knowledge-focus-extract

Nativeknowledge.retrieval

根据用户确认的法规/要点名称,在合并后的法规库与案例库文本中做轻量段落匹配,返回相关摘录。纯关键词打分与截断,无网络调用。

README

暂无文档。

基因作者可在发布时添加 README。

表现型

输入

属性类型必填描述
knowledgeobject知识库内容,laws 和 cases 至少有一个非空
focusNamesarray关注的法规/要点名称列表(最多 12 个)
maxTotalCharsinteger = 12000输出截断上限字符数
maxPerFocusCharsinteger = 4000每个关注点的最大字符数
maxParagraphsPerFocusinteger = 8每个关注点的最大段落数

输出

属性类型必填描述
metaobject匹配元数据
textstring匹配到的相关摘录文本(空字符串表示无匹配)
原始 JSON Schema

inputSchema

{
  "type": "object",
  "required": [
    "focusNames",
    "knowledge"
  ],
  "properties": {
    "knowledge": {
      "type": "object",
      "required": [],
      "properties": {
        "laws": {
          "type": "string",
          "description": "法规库合并正文"
        },
        "cases": {
          "type": "string",
          "description": "案例库合并正文"
        }
      },
      "description": "知识库内容,laws 和 cases 至少有一个非空"
    },
    "focusNames": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "关注的法规/要点名称列表(最多 12 个)"
    },
    "maxTotalChars": {
      "type": "integer",
      "default": 12000,
      "description": "输出截断上限字符数"
    },
    "maxPerFocusChars": {
      "type": "integer",
      "default": 4000,
      "description": "每个关注点的最大字符数"
    },
    "maxParagraphsPerFocus": {
      "type": "integer",
      "default": 8,
      "description": "每个关注点的最大段落数"
    }
  }
}

outputSchema

{
  "type": "object",
  "required": [
    "text",
    "meta"
  ],
  "properties": {
    "meta": {
      "type": "object",
      "properties": {
        "lawsChars": {
          "type": "integer"
        },
        "truncated": {
          "type": "boolean"
        },
        "casesChars": {
          "type": "integer"
        },
        "totalChars": {
          "type": "integer"
        },
        "emptyReason": {
          "type": "string",
          "description": "当 text 为空时的原因:no_focus_names / laws_and_cases_empty / no_paragraphs / no_keyword_hits / excerpts_too_short"
        },
        "matchedNames": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "description": "匹配元数据"
    },
    "text": {
      "type": "string",
      "description": "匹配到的相关摘录文本(空字符串表示无匹配)"
    }
  }
}