refactor: layer fast slow routing knowledge

This commit is contained in:
wuyang6
2026-07-23 21:35:18 +08:00
parent 6116d10e8f
commit ecc02c06b7
21 changed files with 776 additions and 925 deletions
@@ -1,19 +1,27 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://local.skills/label-fast-slow-routing/label-record.schema.json",
"title": "快慢分流打标记录",
"title": "2026.7 快慢分流分层打标记录",
"type": "object",
"additionalProperties": false,
"required": [
"query",
"label",
"default_route",
"primary_reason_code",
"reason_codes",
"domain",
"candidate_domains",
"decision_level",
"decision_rule_id",
"decision_source",
"decision_path",
"reason",
"evidence",
"structural_signals",
"context_used",
"fast_system_pending",
"route_override",
"policy_conflict",
"conflict_refs",
"confidence",
"review_required",
"uncertainties",
@@ -33,15 +41,52 @@
"default_route": {
"enum": ["快系统", "慢系统"]
},
"primary_reason_code": {
"$ref": "#/$defs/reasonCode"
"domain": {
"enum": [
"导航/生服",
"车控",
"产品问答",
"内容",
"系统/App控制",
"通用工具",
"IoT",
"自动化",
null
]
},
"reason_codes": {
"candidate_domains": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"$ref": "#/$defs/reasonCode"
"enum": [
"导航/生服",
"车控",
"产品问答",
"内容",
"系统/App控制",
"通用工具",
"IoT",
"自动化"
]
}
},
"decision_level": {
"enum": ["domain", "structure", "core"]
},
"decision_rule_id": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9_]+$"
},
"decision_source": {
"type": "string",
"pattern": "^references/[a-z0-9-]+\\.md(?:#.*)?$"
},
"decision_path": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"reason": {
@@ -63,21 +108,15 @@
"minLength": 1
}
},
"domain_label": {
"type": ["string", "null"]
},
"candidate_domain_labels": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"minLength": 1
}
},
"structural_signals": {
"type": "object",
"additionalProperties": false,
"required": ["complex", "multi_instruction", "auto_task"],
"required": [
"complex",
"multi_instruction",
"auto_task",
"context_dependent"
],
"properties": {
"complex": {
"type": ["boolean", "null"]
@@ -87,6 +126,9 @@
},
"auto_task": {
"type": ["boolean", "null"]
},
"context_dependent": {
"type": ["boolean", "null"]
}
}
},
@@ -96,18 +138,19 @@
"fast_system_pending": {
"type": ["boolean", "null"]
},
"legacy_eval_label": {
"enum": [
"FAST_DIRECT",
"SLOW_FILTER_RANK",
"SLOW_DISAMBIGUATE",
"SLOW_GOAL_STATE",
"SLOW_WORKFLOW",
"SLOW_CONTEXT_DEPENDENT",
"SLOW_UNCLEAR",
"SLOW_ADVANCED_CAPABILITY",
null
]
"route_override": {
"type": ["string", "null"]
},
"policy_conflict": {
"type": "boolean"
},
"conflict_refs": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"pattern": "^CONFLICT_[A-Z0-9_]+$"
}
},
"confidence": {
"enum": ["high", "medium", "low"]
@@ -123,7 +166,7 @@
}
},
"policy_version": {
"const": "XA4.1-2026.6"
"const": "FAST-SLOW-2026.7"
}
},
"allOf": [
@@ -140,24 +183,6 @@
"properties": {
"default_route": {
"const": "快系统"
},
"primary_reason_code": {
"enum": [
"DIRECT_ACTION",
"DIRECT_DETERMINISTIC_QUERY",
"EXPLICIT_DEVICE_MULTI_ACTION",
"DIRECT_OPERATION_FLOW"
]
},
"reason_codes": {
"items": {
"enum": [
"DIRECT_ACTION",
"DIRECT_DETERMINISTIC_QUERY",
"EXPLICIT_DEVICE_MULTI_ACTION",
"DIRECT_OPERATION_FLOW"
]
}
}
}
}
@@ -166,7 +191,7 @@
"if": {
"properties": {
"label": {
"const": "慢"
"enum": ["慢", "模糊"]
}
},
"required": ["label"]
@@ -178,32 +203,6 @@
},
"fast_system_pending": {
"enum": [false, null]
},
"primary_reason_code": {
"enum": [
"INTENT_INFERENCE",
"SCENE_GOAL_MAPPING",
"MULTI_STEP_PLANNING",
"COMPLEX_REASONING",
"TRUE_DISAMBIGUATION",
"CONTEXT_REQUIRED",
"MISSING_REQUIRED_SLOT",
"AUTOMATION_SLOW_POLICY"
]
},
"reason_codes": {
"items": {
"enum": [
"INTENT_INFERENCE",
"SCENE_GOAL_MAPPING",
"MULTI_STEP_PLANNING",
"COMPLEX_REASONING",
"TRUE_DISAMBIGUATION",
"CONTEXT_REQUIRED",
"MISSING_REQUIRED_SLOT",
"AUTOMATION_SLOW_POLICY"
]
}
}
}
}
@@ -211,39 +210,16 @@
{
"if": {
"properties": {
"label": {
"const": "模糊"
"policy_conflict": {
"const": true
}
},
"required": ["label"]
"required": ["policy_conflict"]
},
"then": {
"properties": {
"default_route": {
"const": "慢系统"
},
"fast_system_pending": {
"enum": [false, null]
},
"primary_reason_code": {
"enum": [
"OPEN_CHAT_OR_QA",
"PRODUCT_KNOWLEDGE",
"FAULT_DIAGNOSIS",
"DEVICE_OR_ENV_STATE_QUERY",
"POLICY_UNCERTAIN"
]
},
"reason_codes": {
"items": {
"enum": [
"OPEN_CHAT_OR_QA",
"PRODUCT_KNOWLEDGE",
"FAULT_DIAGNOSIS",
"DEVICE_OR_ENV_STATE_QUERY",
"POLICY_UNCERTAIN"
]
}
"conflict_refs": {
"minItems": 1
}
}
}
@@ -262,32 +238,8 @@
"review_required": {
"const": true
}
},
"required": ["review_required"]
}
}
}
],
"$defs": {
"reasonCode": {
"enum": [
"DIRECT_ACTION",
"DIRECT_DETERMINISTIC_QUERY",
"EXPLICIT_DEVICE_MULTI_ACTION",
"DIRECT_OPERATION_FLOW",
"INTENT_INFERENCE",
"SCENE_GOAL_MAPPING",
"MULTI_STEP_PLANNING",
"COMPLEX_REASONING",
"TRUE_DISAMBIGUATION",
"CONTEXT_REQUIRED",
"MISSING_REQUIRED_SLOT",
"AUTOMATION_SLOW_POLICY",
"OPEN_CHAT_OR_QA",
"PRODUCT_KNOWLEDGE",
"FAULT_DIAGNOSIS",
"DEVICE_OR_ENV_STATE_QUERY",
"POLICY_UNCERTAIN"
]
}
}
]
}