- 分支内容对齐 qyqy_develop b6ec3aa,树完全一致(同步后 git diff 为空) - 覆盖本轮全部交付:客服 Agent 重构(安全路由 / 五出口 / 记忆与画像 / RAG 全链路) + 开发文档 62 份编号体系(D1.1 v1.17 索引) + 新增 D2.10-客服Agent端到端答辩文档-2026-09-21.html - 基线:e239eb7(2026-09-17 品牌口径统一快照),本提交为其直接后继
243 lines
6.6 KiB
JSON
243 lines
6.6 KiB
JSON
{
|
||
"artifact": "t1b-tiers-and-derived-fields",
|
||
"date": "2026-09-18",
|
||
"decision_refs": [
|
||
"D-01",
|
||
"D-02",
|
||
"DEC-33",
|
||
"H-05"
|
||
],
|
||
"scope": "① 会签批准的 tiers 改造(登录客户可见 registered);② 补切片 family_id/param_class/intent 并重建重灌",
|
||
"code_changes": [
|
||
"app/core/knowledge_contracts.py: 新增 PUBLIC_TIER/REGISTERED_TIER/ALL_TIERS/TIERS_BY_SUBJECT/DEFAULT_TIERS + tiers_for_roles() + visibility_expression()",
|
||
"app/core/knowledge_schema.py: FIELD_CANDIDATES 新增 family_id / param_class",
|
||
"app/service/knowledge_search_service.py: search() 签名 include_internal: bool -> tiers: frozenset[str](必填无默认);_visibility_filter 删除;缺 visibility 字段的集合在受限档位下 fail-closed 跳过;KnowledgeHit 新增 3 字段",
|
||
"app/service/knowledge_tool.py: 用 tiers_for_roles(context.roles) 求值并下传;输出新增 3 字段",
|
||
"tools/build_knowledge_chunks.py: 派生 family_id(去掉两位行级后缀)/ param_class(最早出现的关键字类)/ intent(按集合映射)",
|
||
"tools/setup_milvus_knowledge_collections.py: VARCHAR_FIELDS 新增 family_id(64)/param_class(16)/intent(32)",
|
||
"tests + tools/seed_knowledge_r1r5_faq.py: 7 处调用点补 tiers"
|
||
],
|
||
"tiers_mapping": {
|
||
"visitor": [
|
||
"public"
|
||
],
|
||
"customer": [
|
||
"public",
|
||
"registered"
|
||
],
|
||
"admin(未在表内·收敛)": [
|
||
"public"
|
||
],
|
||
"advisor(未在表内·收敛)": [
|
||
"public"
|
||
],
|
||
"未知/空 roles(收敛)": [
|
||
"public"
|
||
]
|
||
},
|
||
"visibility_expression": {
|
||
"{public}": "visibility in [\"public\"]",
|
||
"{public, registered}": "None(不需要过滤)"
|
||
},
|
||
"dual_verification": {
|
||
"query": "高净值客户有什么权益",
|
||
"guest": {
|
||
"top1": "FAQ-0024",
|
||
"top1_visibility": "public",
|
||
"top_score": 0.5486,
|
||
"verdict": "低于 0.75 高置信门槛 -> 不答 / 引导登录 ✅"
|
||
},
|
||
"customer": {
|
||
"top1": "HNW-006",
|
||
"top1_visibility": "registered",
|
||
"top_score": 0.7604,
|
||
"verdict": "可召回 -> 能作答 ✅(改造前与访客完全相同,恒 0.5486)"
|
||
},
|
||
"public_query_baseline": {
|
||
"query": "基金赎回几天到账",
|
||
"guest_top1": "FAQ-0026",
|
||
"guest_top_score": 0.8446,
|
||
"customer_top1": "FAQ-0026",
|
||
"verdict": "公开问题召回与 A-03 基线一致 ✅"
|
||
}
|
||
},
|
||
"derived_fields": {
|
||
"param_class": {
|
||
"none": 453,
|
||
"scale": 38,
|
||
"threshold": 66,
|
||
"count": 4,
|
||
"rate": 67
|
||
},
|
||
"intent": {
|
||
"policy_explain": 288,
|
||
"product_inquiry": 191,
|
||
"faq": 149
|
||
},
|
||
"family_id_unique": 186,
|
||
"family_id_multi_block": 48,
|
||
"family_id_empty_or_mis_stripped": 0,
|
||
"sample": {
|
||
"POL-AST-009-01": {
|
||
"family_id": "POL-AST-009",
|
||
"param_class": "none",
|
||
"intent": "policy_explain"
|
||
},
|
||
"PROD-006-05": {
|
||
"family_id": "PROD-006",
|
||
"param_class": "threshold",
|
||
"intent": "product_inquiry"
|
||
},
|
||
"FAQ-0026": {
|
||
"family_id": "FAQ-0026",
|
||
"param_class": "threshold",
|
||
"intent": "faq"
|
||
},
|
||
"COMP-001": {
|
||
"family_id": "COMP-001",
|
||
"param_class": "threshold",
|
||
"intent": "faq"
|
||
}
|
||
}
|
||
},
|
||
"milvus_live": {
|
||
"fin_faq_collection": {
|
||
"row_count": 149,
|
||
"unique_doc_id": 149,
|
||
"fields": [
|
||
"doc_id",
|
||
"title",
|
||
"content",
|
||
"chapter",
|
||
"section",
|
||
"tags",
|
||
"doc_no",
|
||
"version",
|
||
"effective_date",
|
||
"expire_date",
|
||
"source_url",
|
||
"reviewer",
|
||
"source_file",
|
||
"family_id",
|
||
"param_class",
|
||
"intent",
|
||
"visibility",
|
||
"embedding"
|
||
],
|
||
"field_count": 18,
|
||
"num_partitions": 16,
|
||
"visibility": {
|
||
"public": 139,
|
||
"registered": 10
|
||
},
|
||
"param_class": {
|
||
"threshold": 17,
|
||
"none": 106,
|
||
"scale": 18,
|
||
"count": 2,
|
||
"rate": 6
|
||
},
|
||
"family_id_unique": 86
|
||
},
|
||
"fin_policy_collection": {
|
||
"row_count": 288,
|
||
"unique_doc_id": 288,
|
||
"fields": [
|
||
"doc_id",
|
||
"title",
|
||
"content",
|
||
"chapter",
|
||
"section",
|
||
"tags",
|
||
"doc_no",
|
||
"version",
|
||
"effective_date",
|
||
"expire_date",
|
||
"source_url",
|
||
"reviewer",
|
||
"source_file",
|
||
"family_id",
|
||
"param_class",
|
||
"intent",
|
||
"visibility",
|
||
"embedding"
|
||
],
|
||
"field_count": 18,
|
||
"num_partitions": 16,
|
||
"visibility": {
|
||
"public": 288
|
||
},
|
||
"param_class": {
|
||
"none": 232,
|
||
"scale": 9,
|
||
"threshold": 24,
|
||
"count": 2,
|
||
"rate": 21
|
||
},
|
||
"family_id_unique": 75
|
||
},
|
||
"fin_product_collection": {
|
||
"row_count": 191,
|
||
"unique_doc_id": 191,
|
||
"fields": [
|
||
"doc_id",
|
||
"title",
|
||
"content",
|
||
"chapter",
|
||
"section",
|
||
"tags",
|
||
"doc_no",
|
||
"version",
|
||
"effective_date",
|
||
"expire_date",
|
||
"source_url",
|
||
"reviewer",
|
||
"source_file",
|
||
"family_id",
|
||
"param_class",
|
||
"intent",
|
||
"visibility",
|
||
"embedding"
|
||
],
|
||
"field_count": 18,
|
||
"num_partitions": 16,
|
||
"visibility": {
|
||
"registered": 15,
|
||
"public": 176
|
||
},
|
||
"param_class": {
|
||
"threshold": 25,
|
||
"none": 115,
|
||
"scale": 11,
|
||
"rate": 40
|
||
},
|
||
"family_id_unique": 25
|
||
}
|
||
},
|
||
"reload_self_check": {
|
||
"result": "7/7 命中",
|
||
"truncated_fields": "无",
|
||
"samples": [
|
||
"FAQ-0026 0.870",
|
||
"POL-AST-012-01 0.792",
|
||
"FAQ-0019 0.612",
|
||
"PROD-006-05 0.695",
|
||
"FAQ-0036 0.847",
|
||
"FAQ-0022 0.848",
|
||
"HNW-005 0.749"
|
||
]
|
||
},
|
||
"gate_rerun": {
|
||
"pytest": "7 failed, 1441 passed, 2 skipped(与基线逐项相同)",
|
||
"ruff": "22 errors(与基线相同)",
|
||
"mypy": "3 errors(与基线相同)",
|
||
"check_authoritative_docs": "0",
|
||
"audit_schema": "0(89 张业务表)",
|
||
"verdict": "相对 T0 基线 0 回归"
|
||
},
|
||
"known_gaps": [
|
||
"admin / advisor / operator 不在 TIERS_BY_SUBJECT 表内,按收敛规则只得 {public} —— 是否放宽属权限决策,未擅自扩张",
|
||
"端到端(Agent 层)验证无法进行:customer_service 未在 AgentFactory 注册(客服业务层已于 2026-09-16 整体清除),且访客创建会话被拒(403 AGENT_PERMISSION_DENIED,属未会签的组 2 访客鉴权)",
|
||
"Milvus row_count 为压缩前乐观计数,观测值可能短暂虚高(前次已自愈)"
|
||
]
|
||
} |