prompt.ts (DRAFT_PLAN_SCRIPT_SYSTEM 重写):
- 删 few-shot JSON 大段(LLM 把示例文本当模板照抄,如"工作日 19:00 后"
伪事实就是这么漏的)
- 加 §0 总则:白名单(诊所/患者/触发原因/画像/临床上下文)+ 自检方法,
白名单之外具体表述视为虚构 → 失败
- 加 §6 时间/排班规则:必含"待确认"短语;(示例) 显式标记或方向词代替具体点;
严禁加粗具体时间("**周六上午10点**" 被读作已敲定)
- 加 医生引用规则:followup 引诊断必须用 reason.triggerDoctor,不能拿
全患者高频医生顶替(38 是姜医生发现,不能写李医生)
promptVersion → draft_plan_script@2026-05-27-time-marker
schema.ts:
close 段 describe() 明确 (示例) 标记规则 + 加粗禁令
call.ts safety rules 新增 3 条:
- close_no_commit_phrasing(block):"已为您约好"/"约定"/"敲定" 等承诺词
- close_no_bold_time(block):正则禁加粗具体时间词
- close_has_tentative_phrasing(warn):未含"待确认"语义短语提示
input.types.ts + orchestrator.buildCallInput:
reason 加 triggerDoctor + triggerDate;plan 加 goal;
clinicalContext 加 ongoingChains + completedTreatmentCount(信任锚);
loadPlanContext fact status filter 改 ['active','fulfilled'](漏 fulfilled 会让
AI 看不到实际 treatment_record → primaryDoctor 偏移、pendingTreatments 漏算);
extractPrimaryDoctor 改"doctor_id 频次 top 1"(对齐前端);
visitFacts EMR 兜底(同 plan-aggregate);
pendingTreatments 改从 plan.reasons 派生(SQL 权威集,旧 DX_TO_CAT 漏 K01/K03)。
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| cli | Loading commit data... | |
| common | Loading commit data... | |
| config | Loading commit data... | |
| modules | Loading commit data... | |
| openapi | Loading commit data... | |
| prisma | Loading commit data... | |
| queues | Loading commit data... | |
| redis | Loading commit data... | |
| app.module.ts | Loading commit data... | |
| health.controller.ts | Loading commit data... | |
| main.ts | Loading commit data... |