Siri 调完 tool 之后,怎么生成 grounded 的回答?
怎么 eval?
先弄清楚:每个概念是什么
- Grounding
- 回答里的每句话都能在 tool result 里找到依据。
- Source of truth
- tool result 说了算,模型的记忆不算。
- Claim
- 回答里一条可以单独核对的事实。例:“UA 123 明天 3 点起飞”有两条 claim:航班号、起飞时间。
- Abstention
- 没查到就说没查到,并说明查了哪些 source。调用失败不算没查到,要重试或如实告知。
- Voice length budget
- 语音回答要短,听的人不能回看。列表只念前几项。
30 秒回答
I'd split it into five stages: run the tools, select the evidence, generate the answer, verify it, and format it for speech. The tool result is the source of truth, so critical fields like times and IDs are copied, not generated. I'd evaluate claim-level groundedness, required-field recall, correct abstention, and spoken length, on a golden set plus adversarial cases, then check reformulation and barge-in online.
五个 stage
| Stage | 做什么 | 防什么 |
|---|---|---|
| Tool execution | 返回 typed result,区分空结果和调用失败 | 把失败当成“没有” |
| Evidence selection | 按问题选字段;按 record 截断,不拦腰切 | context 过长、丢关键字段 |
| Generation | 只依据 evidence;不够就追问或说找不到 | 模型用自己的记忆补内容 |
| Verification | 每条 claim 对 evidence 核对;时间、金额、ID 做 exact match | 细节出错 |
| Voice formatting | 先说答案,数字转成口语 | 太长、读出来别扭 |
Hallucination 分六类:contradiction(和 tool 矛盾)、unsupported(tool 没给却说了)、entity confusion、temporal(时间错或数据旧)、omission(为了短而漏)、该拒答却答。
Eval 指标
| 维度 | Metric |
|---|---|
| Factuality | claim precision = 有依据的 claim ÷ 全部 claim |
| Completeness | required-field recall = 答到的必要信息 ÷ 全部必要信息 |
| Abstention | unanswerable 的拒答率和 answerable 的回答率,一起看 |
| Usefulness | 人工或 LLM judge 按 rubric 打分,judge 用人工校准(见标注与 LLM judge) |
| Voice | 在长度预算内的比例 |
| Online | reformulation(换个说法再问)、barge-in(打断)、task completion |
例:4 条 claim 里 3 条有依据 → claim precision 0.75。要求答 3 项信息,答到 2 项 → required-field recall 0.67。
必答点
- 五个 stage 分开,每个 stage 单独可测
- tool result 是 source of truth;关键字段 copy,不生成
- claim-level 的 precision 和 required-field recall 一起看
- abstention 单独统计;空结果和调用失败分开处理
- 数据:golden set 加 adversarial(空结果、结果矛盾、payload 截断、context 变长)
追问
回答变短之后漏信息怎么办?
按 intent 定 required fields,先保 required-field recall,再压长度。只压长度会把 omission 推高。
context 变长后质量下降怎么办?
先画 context 长度和 claim precision 的曲线。再把旧 tool result 压成 summary,名字、ID、日期逐字保留。
为什么会 hallucinate?
parametric memory 压过 context,context 长而干扰多,payload 被截断后模型自己补全,训练时偏向“总要给个答案”。一般的原因和对策见 LLM hallucination。
来源一亩三分地站方题面:Siri Grounded Response Generation(要求覆盖 grounding、hallucination、voice 长度、长 context 下的 eval)· Nine Judges(Apple) · 完整证据见 Apple 面经报告