把平台智能体的类别与审核规则解析成 createAudit 可直接使用的审核档案
POST/open/v1/audit-profiles:resolve预览scope: viewKnowledge
这是预览能力:字段与行为可能在后续 minor 版本中调整,调整会写进更新日志。近 30 天内新增的能力,或在生产环境 90 天内没有调用记录的能力,标为「预览」;其余为「稳定」。预览能力的字段与行为可能在后续 minor 版本中调整,调整会写进更新日志。
确定性翻译,不调模型:类别(含指标)→ categories,每条规则的模型审核节点 → audit_graph 节点(指标型取指标型提示词,语义型取语义型提示词与定位句),并给出可读的 rules 清单与 warnings。给了 agent 且唯一命中时 resolved=true 并返回 profile;否则 resolved=false 并返回 candidates。查询范围由 API Key 的 Document Space 服务端绑定。
请求
请求体
| 字段 | 类型 | 约束 | 说明 |
|---|---|---|---|
| agent | object | 不接受额外字段 | 按 id / code / name 精确定位已发布且当前版本的智能体;三者给一个即可。 |
| id | integer | ≥1 | |
| code | string | 长度≥1;长度≤128 | |
| name | string | 长度≥1;长度≤256 | |
| query | string | 长度≥1;长度≤2000 | 按业务描述查候选智能体(词面匹配智能体名称与类别名),只返回候选,不替调用方选。 |
| doc_names | array<string> | 项数≤50 | 待审文档的文件名,按名称里出现的类别名匹配候选智能体。 |
| limit | integer | 默认 5;≥1;≤10 |
响应
200请求已成功处理
展开 data 结构(62 个字段)
| 字段 | 类型 | 约束 | 说明 |
|---|---|---|---|
| data | object | 不接受额外字段 | |
| resolved必填 | boolean | ||
| profile | 任一 | ||
| agent必填 | object | 不接受额外字段 | |
| id | integer | null | ||
| name必填 | string | ||
| code | string | null | ||
| description | string | null | ||
| version | string | null | ||
| categories必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| code必填 | string | 长度≥1;长度≤128 | |
| name必填 | string | 长度≥1;长度≤256 | |
| description | string | 长度≤2000 | |
| indicators必填 | array<object> | 项数≥1;项数≤100 | |
| [ ] | object | 不接受额外字段 | |
| name必填 | string | 长度≥1;长度≤256 | |
| type必填 | string | 枚举 "text" / "number" / "span" / "section" / "list" / "entity" / "obj_list" | |
| description必填 | string | 长度≥1;长度≤2000 | |
| attrs | array<object> | 项数≥1 | |
| [ ] | object | 不接受额外字段 | |
| retrieval_context | object | null | 不接受额外字段 | |
| scope必填 | string | 枚举 "document" / "sections" | |
| section_hints | array<string> | 项数≥1;项数≤20;元素不重复 | |
| similar_text | string | null | 长度≤4000 | |
| audit_graph必填 | object | 不接受额外字段 | |
| nodes必填 | array<object> | 项数≥1;项数≤100 | |
| [ ] | object | 不接受额外字段 | |
| id必填 | string | 长度≥1;长度≤64;正则 ^[A-Za-z][A-Za-z0-9_.:-]{0,63}$ | |
| name必填 | string | 长度≥1;长度≤256 | |
| rule必填 | string | 长度≥1;长度≤12000 | |
| type必填 | integer | ≥1;≤4 | |
| comment_required必填 | boolean | ||
| category_codes必填 | array<string> | 项数≥1;项数≤50;元素不重复 | |
| indicator_names必填 | array<string> | 项数≥0;项数≤100;元素不重复 | 节点消费的指标名称;必须来自请求提供的指标闭集,且在每个适用类别里都存在。空数组表示适用类别的全部指标(跨类别规则各类别指标集不同时用这个)。 |
| predicate | object | 判定式(可选):规则编译成的封闭 JSON 表达式,给出时该节点由代码确定性执行、不调模型,结论为 pass / fail / insufficient(引用字段缺失即证据不足)。语法:op 为 and/or/not、forall/exists(var、category、可选 where、assert)、eq/ne/contains/in/gt/ge/lt/le(left、right、mode 为 text/number/date)、present(arg);取值为 {doc, field}、{business: 路径,列表用 标的物[].出厂编号}、{const}。只能引用请求里的类别与该类别的指标。 | |
| adjacency必填 | object | 邻接表:键为前置节点 ID,值为其直接后继节点 ID 列表。 | |
| rules必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| node_id必填 | string | ||
| rule_id | integer | string | null | ||
| name必填 | string | ||
| type必填 | integer | ≥1;≤4 | |
| type_label必填 | string | ||
| mode必填 | string | 枚举 "indicator" / "semantic" | |
| category_codes必填 | array<string> | ||
| category_names必填 | array<string> | ||
| indicator_names | array<string> | ||
| rule必填 | string | ||
| description | string | null | ||
| comment_required | boolean | ||
| warnings必填 | array<string> | ||
| candidates必填 | array<object> | ||
| [ ] | object | 不接受额外字段 | |
| id必填 | integer | null | ||
| name必填 | string | ||
| code | string | null | ||
| description | string | null | ||
| categories必填 | array<string> | ||
| rule_count必填 | integer | ≥0 | |
| score | integer | ||
| matched | array<string> |
错误状态
| HTTP | 含义 |
|---|---|
| 400 | 请求参数无效 |
| 401 | API Key 无效 |
| 403 | API Key 无权限 |
| 404 | 文档、任务或其他资源不存在 |
| 413 | 请求体过大 |
| 415 | 请求媒体类型不支持 |
| 500 | 服务内部异常 |
| 502 | 上游服务异常 |
| 503 | 能力暂不可用 |
| 504 | 上游服务超时 |