Files
zk-data-agent/skills/model-labeling/knowledge/input_formats.md
2026-05-21 19:10:06 +08:00

82 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Model Labeling 输入格式
本 skill 的脚本会把不同来源的数据统一成 sample:
```json
{
"index": 0,
"request_id": "",
"query": "",
"prompt": "",
"gold_label": "",
"source_format": ""
}
```
## canonical records
识别条件:
- JSONL 每行是对象,或 JSON 数组 / `{ "records": [...] }`
- 对象包含 `turn.query`
字段来源:
- `query``turn.query`
- `request_id``source.request_id`
- `gold_label``complex=true/false` + `label.target`
- `prompt`:按 product-data 的 planning prompt 规则生成
## training jsonl
识别条件:
- 每行是对象。
- 包含 `instruction``system`
字段来源:
- `prompt``system + instruction` 包成 chat template;如果已有 `prompt` 则直接使用。
- `gold_label``output`
- `query`:尽力从 `[当前query]` 后的 `用户:` 抽取。
## eval/planning CSV
识别条件:
- CSV 表头包含 `newPrompt``query`
字段来源:
- `prompt`:优先 `newPrompt`
- `query``query`
- `gold_label``code标签`,如果有 `complex` 列则组合成两行
## 同事流转 CSV
识别条件:
- CSV 表头包含 `query``function`
字段来源:
- `query``query`
- `request_id``request_id`
- `gold_label``function`
- `prompt`:根据 `query``prev_session``context` 生成 planning prompt
## 未知格式
如果不能识别,脚本返回:
```json
{
"ok": false,
"needs_mapping": true,
"columns": ["..."],
"error": "..."
}
```
此时必须询问用户字段映射,不要猜。