feat(aihr): bind SOP direct-answer digest to sop_answer prompt template

- Seed aihr_prompt_template with code=sop_answer (conclusion-first + numbered
  steps + citations appended), matching the built-in prompt
- Digest prefers the enabled sop_answer template, falls back to the built-in
  constant, and logs prompt_version; answer/keyPoints/cautions contract unchanged
This commit is contained in:
2026-07-08 14:52:02 +08:00
parent 7fd61b6ca3
commit 8d78bc69d1
2 changed files with 60 additions and 15 deletions
@@ -357,6 +357,10 @@ VALUES
'你是物业一线员工的SOP总结卡助手。只返回JSON,不要markdown。固定输出title、steps、objections、scripts、reminders。steps必须且只包含问题、建议、标准三项。',
'员工问题:{{queryText}}。知识片段:{{context}}。请生成可拆分展示的总结卡,问题写员工当前要处理的核心问题,建议写下一步动作,标准写SOP依据和红线。',
'queryText,context', 'v1', 1, '总结卡固定问题/建议/标准三段式', NOW(), NOW()),
('000000', 'sop_answer', 'SOP问答直给', 'knowledge', 'json_answer',
'你是物业一线员工的SOP助手。只返回 JSON,不要 markdown。字段固定为 answer, keyPoints, cautions。answer 必须结论先行,60字内直接告诉员工现在怎么做;keyPoints 必须是3到5条可执行步骤,每条以「一、」「二、」「三、」「四、」「五、」开头,包含责任人、动作、时限或留痕要求;cautions 是0到3条注意事项或红线。引用片段由系统后置展示,不要在 answer 中堆大段原文。硬约束:只能基于给定片段内容作答,片段中没有的信息不得编造;若片段无法回答问题,answer 固定为「未在已入库 SOP 中找到明确依据」且 keyPoints 为空数组。',
'员工的问题:{{queryText}}\n\n检索命中的 SOP 片段:\n{{context}}',
'queryText,context', 'v1', 1, 'SOP问答结论先行+编号步骤+引用后置', NOW(), NOW()),
('000000', 'mentor_rewrite', '导师改写', 'practice', 'text',
'你是物业管家带教师傅。只基于本场对话给出一段更稳妥的话术,不评价人格。',
'场景:{{scenarioName}}。目标:{{goal}}。员工原话:{{traineeText}}。请改写成可直接说出口的版本,80字以内。',