Add online mining v2 skill
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
# 工作流
|
||||
|
||||
## 分支 A:线上候选直接作为数据样本
|
||||
|
||||
适用表达:
|
||||
|
||||
- “把筛选出的数据变成样本”
|
||||
- “拿线上数据做评测集”
|
||||
- “保留这批线上 case”
|
||||
- “导出候选样本”
|
||||
|
||||
流程:
|
||||
|
||||
1. 分析需求,确认目标标签和复杂度。
|
||||
2. 设计 ELK 挖掘策略。
|
||||
3. 用 `elk_search_cases.py` 拉候选。
|
||||
4. 用 `elk_join_request_logs.py` 补全 main/pre_processing 字段。
|
||||
5. 展示小批候选给用户 review。
|
||||
6. 用户确认后,用 `build_dataset_draft.py` 转 dataset draft。
|
||||
7. 用 `product-data` 脚本 normalize、validate、export。
|
||||
|
||||
这个分支不生成新 query。
|
||||
|
||||
## 分支 B:基于线上问题补充生成数据
|
||||
|
||||
适用表达:
|
||||
|
||||
- “基于这些 badcase 再生成一批”
|
||||
- “扩写类似 case”
|
||||
- “构造训练数据”
|
||||
|
||||
流程:
|
||||
|
||||
1. 先完成分支 A 的线上问题定位和 review。
|
||||
2. 总结线上错误模式、边界和负例。
|
||||
3. 切到 `product-data` 的 generation goal / generation plan。
|
||||
4. 用户确认计划后再生成新数据。
|
||||
|
||||
## review 展示建议
|
||||
|
||||
每条候选优先展示:
|
||||
|
||||
```text
|
||||
request_id:
|
||||
query:
|
||||
planning_result:
|
||||
main.domain / main.func:
|
||||
candidate_domains:
|
||||
session_id / device_id:
|
||||
tts:
|
||||
```
|
||||
|
||||
不要默认展示完整 prompt。prompt 很长时只展示命中片段。
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
# 数据源字段说明
|
||||
|
||||
## main:`arch-flat-nlp-log-f-*`
|
||||
|
||||
适合拿最终线上请求结果。
|
||||
|
||||
常用字段:
|
||||
|
||||
| 字段 | 含义 |
|
||||
| --- | --- |
|
||||
| `request_id` | 请求 id,和 product-data 的 `request_id` 对齐。 |
|
||||
| `timestamp` | 请求时间戳。 |
|
||||
| `query` | 当前 query。 |
|
||||
| `domain` | 最终 domain。 |
|
||||
| `func` / `func_name` | 最终 function 或函数名。 |
|
||||
| `session_id` | 会话 id,可用于后续重建多轮。 |
|
||||
| `device_id` | 设备 id。 |
|
||||
| `device` | 设备 JSON,包含设备类型、经纬度等。 |
|
||||
| `text` / `display_text` / `to_speak` | 小爱回复文本,可作为上一轮 tts。 |
|
||||
| `intention` | 传统意图结果。 |
|
||||
| `intention.intent_arbitrator_info` | 中控仲裁信息,含 `llm_agent_info`、`score_domains`、`hit_rules` 等。 |
|
||||
| `llm_*` | 大模型分类相关字段,覆盖情况取决于链路。 |
|
||||
|
||||
适合筛选:
|
||||
|
||||
- `query` 包含/正则。
|
||||
- `domain`、`func`、`func_name`。
|
||||
- `session_id`、`device_id`、设备类型。
|
||||
- `intention.intent_arbitrator_info.llm_agent_info.agentType`。
|
||||
|
||||
## pre_processing:`pre-processing-info*`
|
||||
|
||||
适合拿前处理和规划模型判断过程。
|
||||
|
||||
常用字段:
|
||||
|
||||
| 路径 | 含义 |
|
||||
| --- | --- |
|
||||
| `requestId` | 请求 id。 |
|
||||
| `timestamp` | 前处理日志时间戳。 |
|
||||
| `responseBoby.nodes.0.core.query.query` | 当前 query。注意字段名是 `responseBoby`。 |
|
||||
| `responseBoby.nodes.0.core.dispatch_large_model_result.code` | 前处理最终 code。 |
|
||||
| `responseBoby.nodes.0.core.dispatch_large_model_result.dispatchLargeModelInput.promptModel` | planning 模型 prompt。 |
|
||||
| `responseBoby.nodes.0.core.dispatch_large_model_result.dispatchLargeModelInput.hitRuleList` | 触发规则。 |
|
||||
| `responseBoby.nodes.0.core.dispatch_large_model_result.planningDebugInfo.planningOriginalResult` | planning 模型原始输出。 |
|
||||
| `responseBoby.nodes.0.core.excellent_domains_result` | 候选 domain 及旧意图结果。 |
|
||||
| `responseBoby.nodes.0.properties.0.debug.domain_infos` | 前处理召回 domain 列表。 |
|
||||
| `responseBoby.nodes.0.properties.0.debug.promptString` | agent LLM prompt。 |
|
||||
| `responseBoby.nodes.0.properties.0.debug.planningPrompt` | planning prompt。 |
|
||||
| `responseBoby.nodes.0.properties.0.agentLLMIntent` | agent LLM 判定。 |
|
||||
|
||||
适合筛选:
|
||||
|
||||
- `query` 包含/正则。
|
||||
- `planningOriginalResult` 包含某标签或 function。
|
||||
- `promptModel` 包含某上下文、历史或 query 结构。
|
||||
- `excellent_domains_result[*].domain` 包含某候选 domain。
|
||||
- `domain_infos[*].domain` 包含某召回 domain。
|
||||
|
||||
## join 规则
|
||||
|
||||
两张表通过:
|
||||
|
||||
```text
|
||||
main.request_id == pre_processing.requestId
|
||||
```
|
||||
|
||||
join 后优先使用:
|
||||
|
||||
- query:优先 `pre_processing` 的 query,缺失时用 `main.query`。
|
||||
- timestamp:优先 `main.timestamp`,缺失时用 `pre_processing.timestamp`。
|
||||
- tts:优先 `main.to_speak`,再 `main.text` 或 `display_text`。
|
||||
- label 参考:模型输出用 `pre_processing.planning_result`,线上最终结果用 `main.domain` / `main.func`。
|
||||
|
||||
Reference in New Issue
Block a user