Prioritize doctor instructions in AI report prompts

- Extract AI prompt construction into a tested utility for report editor generation.

- Make doctor instructions and structured report fields higher priority than old template body and target-region HTML.

- Tell the AI not to carry over default gallbladder or liver descriptions when the doctor asks for another procedure or body part.

- Limit old full-report context length to reduce anchoring on default template content.

- Update README, AGENTS, report editor, design, progress, and testing docs for the AI prompt priority model.

- Add unit tests covering AI prompt priority and old-content truncation.
This commit is contained in:
2026-05-02 04:39:18 +08:00
parent 44decaa396
commit 55622368e3
9 changed files with 129 additions and 8 deletions

View File

@@ -351,6 +351,7 @@ PostgreSQL 数据模型。当前覆盖 `Tenant`、`Department`、`User`、`UserS
- 后端模板 DTO 和权限资源映射
- 模板列表合并工具,防止新增模板被旧 `localStorage.templates` 覆盖
- 模板导入导出工具,覆盖 HTML 模板包生成、字段库元数据回导和旧 JSON 导入兼容
- AI Prompt 生成工具,确保医生指令和结构化报告字段优先于默认模板旧内容
- 后端用户 DTO 和部门模板授权映射
- 后端系统设置 schema 校验
- 后端 AI 入参和讯飞语音代理帧处理