fix(prompts): accept conversational time confirmations and improve clarification

This commit is contained in:
Eric Wang
2026-10-28 17:46:22 +08:00
parent ddcfe5bd05
commit 89acf4f617
10 changed files with 216 additions and 53 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
# 对话案例索引
本目录保留52个YAML案例,输入、断言和文件路径均保持原样。执行入口、分组参数及断言格式见[评估说明](../README.md)。跨目录测试集定义在[../suites.yaml](../suites.yaml),不会复制这里的案例。
本目录保留54个YAML案例,输入、断言和文件路径均保持原样。执行入口、分组参数及断言格式见[评估说明](../README.md)。跨目录测试集定义在[../suites.yaml](../suites.yaml),不会复制这里的案例。
## 信息采集
@@ -11,6 +11,7 @@
| 同上 | `dual_unclear_injury` | 人伤不确定先澄清,再使用已有信息 |
| 同上 | `single_no_inferred_count` | 历史文件名;最新边界已改为倒车撞固定物提取1,不再问数量 |
| `time_confirmation` | `correction` | 首次确认、补充信息、时间更正和再次确认 |
| 同上 | `acceptance` | 时间确认回答“可以”后直接补问现场,不重复时间确认 |
| `customer_feedback` | `repeated_question` | 客户原始多轮反馈,单车描述提取1,后续不重复问数量 |
| 同上 | `known_fields` | 时间确认与抱怨一起表达时,仍保留已知信息 |
@@ -40,7 +41,7 @@
## 常用选择
```bash
# 快速回归,6个direct案例
# 快速回归,7个direct案例
conda run -n py3.11 python -m evals.run --suite smoke --mode direct --list
# 只看三车事故
@@ -0,0 +1,27 @@
name: browser_addon_time_confirmation_acceptance
clientMode: browser_addon
# 客户反馈:“可以”认可时间后不得继续重复确认;只补问现场。
steps:
- input: 新对话
expect: {stageCode: "browser_addon.1001"}
- input: 【继续办理】
expect: {stageCode: "browser_addon.1002"}
- input: 我的车子是自己的小轿车,撞到了路边围栏。没有人员受伤,没有涉及非机动车,也没有行人。时间是2026年10月27日十四点左右。
expect:
stageCode: "browser_addon.1002"
form: {vehicle_count: 1, has_injury: false, has_non_motor_vehicle_hit: false, accident_time: "2026年10月27日14点0分"}
formAbsent: [is_on_scene]
replyMatches: "我记录的时间是2026年10月27日14点00分.*这个时间对吗"
replyNotMatches: "现场|拍照"
- input: 可以。
expect:
stageCode: "browser_addon.1002"
replyMatches: "(在.*现场|现场.*吗)"
replyNotMatches: "(这个时间对吗|几点|什么时候|再次确认|再确认.*时间)"
formAbsent: [is_on_scene]
- input: 我现在还在事故现场。
expect:
stageCode: "browser_addon.2000"
form: {vehicle_count: 1, is_on_scene: true, accident_time: "2026年10月27日14点0分"}
replyNotMatches: "(这个时间对吗|几点|什么时候|几辆|多少辆)"
@@ -0,0 +1,27 @@
name: direct_time_confirmation_acceptance
clientMode: direct
# 客户反馈:“可以”认可时间后不得继续重复确认;只补问现场。
steps:
- input: 新对话
expect: {stageCode: "1001"}
- input: 【继续办理】
expect: {stageCode: "1002"}
- input: 我的车子是自己的小轿车,撞到了路边围栏。没有人员受伤,没有涉及非机动车,也没有行人。时间是2026年10月27日十四点左右。
expect:
stageCode: "1002"
form: {vehicle_count: 1, has_injury: false, has_non_motor_vehicle_hit: false, accident_time: "2026年10月27日14点0分"}
formAbsent: [is_on_scene]
replyMatches: "我记录的时间是2026年10月27日14点00分.*这个时间对吗"
replyNotMatches: "现场|拍照"
- input: 可以。
expect:
stageCode: "1002"
replyMatches: "(在.*现场|现场.*吗)"
replyNotMatches: "(这个时间对吗|几点|什么时候|再次确认|再确认.*时间)"
formAbsent: [is_on_scene]
- input: 我现在还在事故现场。
expect:
stageCode: "2000"
form: {vehicle_count: 1, is_on_scene: true, accident_time: "2026年10月27日14点0分"}
replyNotMatches: "(这个时间对吗|几点|什么时候|几辆|多少辆)"