Fix product data eval export format
This commit is contained in:
@@ -29,6 +29,9 @@ canonical record 是产品数据生成链路的中间元数据格式。它不是
|
||||
"target": "Agent(tag=\"xxx\")",
|
||||
"target_type": "agent"
|
||||
},
|
||||
"dimensions": {
|
||||
"complex": false
|
||||
},
|
||||
"meta": {
|
||||
"case_name": "case名称",
|
||||
"notes": ""
|
||||
@@ -44,6 +47,7 @@ canonical record 是产品数据生成链路的中间元数据格式。它不是
|
||||
- 相邻轮时间间隔超过 5 分钟时给 warning。
|
||||
- `label.target` 必须有值。
|
||||
- `target_type` 只能是 `agent`、`function` 或 `unknown`。
|
||||
- `dimensions.complex` 必须是布尔值,表示当前 query 是否为复杂任务;它是独立维度,不写入 `label.target`。
|
||||
|
||||
## 默认导出
|
||||
|
||||
@@ -52,7 +56,7 @@ canonical record 是产品数据生成链路的中间元数据格式。它不是
|
||||
- `records.jsonl`:canonical records,一行一条紧凑 JSON。
|
||||
- `records.csv`:同事流转表格,字段为 `request_id,timestamp,query,prev_session,context,label,是否迁移Function,function`。
|
||||
|
||||
`records.csv` 中的 `prev_session` 和 `context` 是紧凑 JSON 字符串;`prev_session` 中的 `timestamp` 按历史表格习惯输出为字符串。
|
||||
`records.csv` 中的 `prev_session` 和 `context` 是紧凑 JSON 字符串;`prev_session` 中的 `timestamp` 按历史表格习惯输出为字符串。`function` 列会把复杂度和监督标签组合成两行,例如 `complex=false\nAgent(tag="地图导航")`。
|
||||
|
||||
如果已有 `records.jsonl` 或 `records.json`,只需要补表格,可以执行 portable `export_dataset_table.py` 或等价工具;默认仍输出到同目录的 `records.csv`。
|
||||
|
||||
@@ -60,7 +64,7 @@ canonical record 是产品数据生成链路的中间元数据格式。它不是
|
||||
|
||||
训练和评测格式都从 canonical records 转换,不由模型手写:
|
||||
|
||||
- `training.jsonl`:每行 `{"system": "...", "instruction": "...", "output": "..."}`,由 `export_training_jsonl.py` 或 `data_agent_export_training_jsonl` 生成。
|
||||
- `eval_planning.csv`:字段为 `request_id,newPrompt,query,类别真实标签,code标签,complex`,由 `export_planning_eval_csv.py` 或 `data_agent_export_planning_eval_csv` 生成。
|
||||
- `training.jsonl`:每行 `{"system": "...", "instruction": "...", "output": "..."}`,由 `export_training_jsonl.py` 或 `data_agent_export_training_jsonl` 生成;`output` 会输出 `complex=true/false` 加监督标签两行。
|
||||
- `eval_planning.csv`:字段为 `request_id,newPrompt,query,类别真实标签,code标签,complex`,由 `export_planning_eval_csv.py` 或 `data_agent_export_planning_eval_csv` 生成;`newPrompt` 会包上 `<|im_start|>system/user/assistant` chat template;`complex` 列来自 `dimensions.complex`,按评测表习惯输出 `TRUE/FALSE`,不是固定默认值。
|
||||
|
||||
`instruction` 和 `newPrompt` 使用同一套 prompt 模板,默认包含 `[知识注入]`、`[系统状态]`、`[对话历史]`、`[当前query]`、`[function]`。历史轮次默认最多取 5 轮,且相邻时间间隔不超过 5 分钟。
|
||||
`instruction` 和 `newPrompt` 使用同一套 prompt 主体,默认包含 `[知识注入]`、`[系统状态]`、`[对话历史]`、`[当前query]`、`[function]`。历史轮次默认最多取 5 轮,且相邻时间间隔不超过 5 分钟。
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
### case: case名称
|
||||
用户: 本轮 query
|
||||
complex: false
|
||||
target: Agent(tag='xxx')
|
||||
notes: 可选,说明覆盖的问题或边界
|
||||
|
||||
@@ -16,6 +17,7 @@ notes: 可选,说明覆盖的问题或边界
|
||||
用户: 前一轮 query
|
||||
小爱: 前一轮 tts
|
||||
用户: 本轮 query
|
||||
complex: false
|
||||
target: Agent(tag='xxx')
|
||||
notes: 可选,说明覆盖的问题或边界
|
||||
```
|
||||
@@ -26,10 +28,11 @@ notes: 可选,说明覆盖的问题或边界
|
||||
- `用户:` 表示用户 query。
|
||||
- `小爱:` 表示小爱回复 tts。
|
||||
- 最后一个 `用户:` 是本轮 query。
|
||||
- `complex:` 是复杂度维度,必须独立填写 `true` 或 `false`;无法确定时先问用户,不要把它塞进 `target`。
|
||||
- `target:` 是本轮 query 对应的监督标签,必须存在。
|
||||
- Agent 标签推荐写单引号形式 `Agent(tag='xxx')`,转换工具会规范成 `Agent(tag="xxx")`。
|
||||
- 单轮数据只需要写一行 `用户:`,然后写 `target:`。
|
||||
- 单轮数据只需要写一行 `用户:`,然后写 `complex:` 和 `target:`。
|
||||
- 多轮数据需要按照时间顺序写多组 `用户:` / `小爱:`。
|
||||
- 多轮数据的最后一轮只写 `用户:` 和 `target:`,不要写最后一轮 `小爱:`。
|
||||
- 多轮数据的最后一轮只写 `用户:`、`complex:` 和 `target:`,不要写最后一轮 `小爱:`。
|
||||
- 如果 `target` 无法确定,不要编造,必须向用户确认。
|
||||
- 不要手写 `record_id`、`request_id`、`timestamp`、`context`。
|
||||
|
||||
Reference in New Issue
Block a user