feat(agent): align with workflow@20261022 - turn_context messages and prompt tails

- merge main (b0ff2e0..c7ca781): workflow/20261022 moves dynamic context
  out of fixed prompts - collection/extraction prompts carry no inline vars;
  reference time and current form travel in the user message <turn_context>
  block; photo/confirm data kept at prompt tails
- prompts: all 8 files regenerated from 20261022 (byte-identity tests
  point at the new export)
- collect: user message = <turn_context>(本轮参考时间) + <user_input>;
  extraction message adds 当前表单; single trusted clock per turn threads
  through reply/extraction/repair
- photo: raw input only (20261022 photo nodes use system_text, no wrapper)
- workflow fake llm: unwraps <user_input> before event parsing
- fields: accident_time normalized to extraction format (YYYY年M月D日H点m分,
  strip zero padding) - fixes form assertion mismatch with padded output
- evals/run.py: trust_env=False - bypass Windows system proxy (registry
  proxy at 192.168.0.4:7897 was intercepting localhost and returning 503)
- verified: 172 unit tests; ALL golden suites pass on real model
  (46/46): collection_skip 12/12, photo_skip 4/4, no_false 2/2,
  button_guidance 12/12, non_motor_vehicle 14/14, time_confirmation 2/2
This commit is contained in:
Eric Wang
2026-10-22 12:28:24 +08:00
parent f9ec20cd81
commit e72d9c9bc0
15 changed files with 205 additions and 99 deletions
+3 -3
View File
@@ -384,19 +384,19 @@ docs/langgraph/
| 黄金案例 | 结果 | 说明 |
|---|---|---|
| `collection_skip_known_info` | 11/12 | 存在轮次间波动;仅 `single_no_inferred_count`(双模式)稳定失败:时间确认后漏问数量直接分流 |
| `collection_skip_known_info` | **12/12** | 20261022(turn_context + 提示词 r2)后全过,原稳定失败已消除 |
| `photo_skip_plate_confirm` | 4/4 | 20261021 步骤5(时间复述确认)修复了原“对”分歧 |
| `no_false`(asr,main 已移除旧 6 例) | 2/2 | — |
| `photo_button_guidance` | 12/12 | — |
| `non_motor_vehicle`(新增) | 14/14 | 依赖 formUpdate 管线(提取节点 + 更新表单差量语义) |
| `time_confirmation`(新增) | 1/2 | 轮次间波动;失败例为话术字面偏离(main 已将 fill_missing 断言放宽为语义正则,此套件仍用字面模板) |
| `time_confirmation`(新增) | **2/2** | 时间格式归一化(月日时分去前导零)后全过 |
**统一失败模式**:开放问题(“您现在还在事故现场吗?”)未获明确回答时,用户输入短促词(“对”),评测期望保持 1002 澄清,模型直接分流 2000/2010。移植侧已排除提示词、历史、变量、温度(0 与缺省均试过)差异;模型名与 FastGPT 应用一致(deepseek-v4.1-flash)。
### 开放问题(20261021 合并后更新)
1. **已解决**:原“对”分流分歧——main 的 20261021 提示词新增步骤5(事故时间必须复述并经用户确认,未确认不得分流),`photo_skip_plate_confirm` 4/4、`no_false`(asr)2/2 通过;旧 `no_false` 6 例与 2004 分歧随案例更新一并关闭。2004 按“车牌确认、双走向合法”实现并保留在白名单。
2. **模型顺序执行差异(3 例)**:`single_no_inferred_count`(2 例)时间确认后漏问数量直接分流;`time_confirmation`(1 例)话术字面偏离模板(“我记录的事故时间是”vs“我记录的时间是”)。均为模型对提示词顺序/字面模板的服从度问题,移植侧无差异可查;按规则 4 留档,必要时由评测负责人确认是否按行为语义(而非字面)断言或重录。
2. **已解决(20261022)**:`single_no_inferred_count` 与时间确认话术问题——main 的 20261022 将动态上下文移出固定提示词(`<turn_context>` 传递参考时间与表单),配合提示词 r2,全部 46 例黄金评测通过。原留档关闭。
3. **待落实**:FastGPT 应用层配置(应用级系统提示词/思考开关)仍建议对账一次,作为作业 10 等价性证据的一部分。
### 代码地图(截至作业 5)