🔒 PE Prompt 模板三段式强制化 · 交互 Demo(数据全部虚构)
体验点:① 编辑「旧版单文本」配置并
修改 Prompt 内容
→ 保存被拦截;② 点
AI 转为三段式
(模拟转换)后保存放行;③ 只改
启用开关 / 关联项目
不改 Prompt → 保存放行;④
新增配置
选提示词模板 → 格式锁死三段式。后端 create/update 接口同步做同样校验(错误码
AI_CHECK_PROMPT_LEGACY_FROZEN
),demo 仅演示前端。
PE配置管理
新增配置
搜索
重置
{{ row.category==='model'?'模型配置':'提示词模板' }}
{{ row.promptTemplateFormat==='sections_v1'?'三段式':'旧版单文本' }}
-
{{ row.businessType==='job'?'作业':'简历审核' }}
{{ row.enabled?'启用':'禁用' }}
{{ row.multimodalEnabled?'开启':'关闭' }}
-
{{ row.projectIds.length }}个
平台全局
详情
编辑
修改 Prompt 内容后,需先转换为三段式才能保存;仅修改启用状态、关联项目等配置不受影响。
1. 输入变量使用
{fieldName}
占位符,系统会自动替换为 jobData 中对应字段的实际值。
2. 选择三段式时,系统会自动拼接 Output 约束。需要判断是否通过时配置 Pass 判定标准;不判断时 status 固定为 no_judgment。
3. 最终输出JSON格式固定为:
{ "status": "pass", "reason": "说明判断依据", "failed_dimension": "...", "evidence": [...] }
平台全局
指定项目
指定项目作用域至少选择一个项目,最多500个
三段式
新建提示词模板固定使用三段式
三段式
旧版单文本
AI 转为三段式
可选工具。粘贴旧版单文本 Prompt 后转换,会自动回填下方三段式字段。
{{ convertingPrompt ? '转换中...' : '✨ AI 转为三段式' }}
清空
↩ 恢复旧版单文本
{{ w }}
Output 配置
{{ isPassFail ? '固定字段 status、reason 由系统生成,这里配置判断模式、Pass 标准和额外返回示例。' : '固定字段 status 由系统生成,这里配置判断模式和额外返回示例。' }}
*
是否判断 Pass
判断 Pass/Fail
不判断
pass
fail
AI 只会在 pass / fail 中选择,满足 Pass 判定标准时返回 pass。
no_judgment
AI 固定返回 no_judgment,不需要配置 Pass 判定标准。
*
Pass判定标准
*
Output示例数据(JSON)
{{ outputJsonError }}
{{ promptSectionsPreview }}
{{ convertingPrompt ? '转换中...' : '✨ AI 转为三段式' }}
修改 Prompt 内容需先转换为三段式
开启后将附件以 attachments 字段透传给检测服务
取消
确定
{{ currentConfig.id }}
{{ currentConfig.configKey }}
{{ currentConfig.configName }}
{{ currentConfig.category==='model'?'模型配置':'提示词模板' }}
{{ currentConfig.category==='prompt' ? (currentConfig.promptTemplateFormat==='sections_v1'?'三段式':'旧版单文本') : '-' }}
{{ currentConfig.businessType==='job'?'作业':'简历审核' }}
{{ currentConfig.configType }}
{{ (currentConfig.projectIds||[]).length ? `指定项目(${currentConfig.projectIds.length}个)` : '平台全局' }}
{{ currentConfig.enabled?'启用':'禁用' }}
{{ currentConfig.configDescription || '-' }}
{{ currentConfig.category==='prompt' ? 'Prompt模板' : '配置值' }}
{{ buildPreview(currentConfig.promptSections) }}
{{ currentConfig.configValue }}
{{ currentConfig.configValue }}