feat(小宝预警): 增加 AI 风险解读接口
This commit is contained in:
32
apps/server/src/modules/ai/prompts/risk-interpret.ts
Normal file
32
apps/server/src/modules/ai/prompts/risk-interpret.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
export const RISK_INTERPRET_TOOL_NAME = 'submit_risk_interpretation';
|
||||
export const RISK_INTERPRET_TOOL_DESCRIPTION = '返回小宝预警的结构化解释';
|
||||
|
||||
export const RISK_INTERPRET_SYSTEM_PROMPT = `你是 FTB 项目管理系统中的“小宝预警”解释助手。
|
||||
|
||||
你只能解释系统给出的规则预测结果和证据,不能编造不存在的数据。
|
||||
你需要用项目经理能理解的中文说明:
|
||||
1. 当前能不能按期发版;
|
||||
2. 为什么有风险;
|
||||
3. 预计延期或建议发版窗口;
|
||||
4. 需要优先处理的动作;
|
||||
5. 哪些负责人或角色需要关注。
|
||||
|
||||
输入中的 signals 是规则引擎压缩后的结构化风险信号,优先用它判断 Bug、测试失败、阻塞、静默风险和临近发版的变化。
|
||||
如果 confidence 低,必须提醒“预测可信度较低,需补充数据”。
|
||||
|
||||
输出必须通过 submit_risk_interpretation 工具返回,不要输出自然语言正文或 Markdown。`;
|
||||
|
||||
export const RISK_INTERPRET_TOOL_INPUT_SCHEMA = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
summary: { type: 'string' },
|
||||
why: { type: 'array', items: { type: 'string' } },
|
||||
forecast: { type: 'string' },
|
||||
recommendedReleaseWindow: { type: 'string' },
|
||||
suggestedActions: { type: 'array', items: { type: 'string' } },
|
||||
ownerHints: { type: 'array', items: { type: 'string' } },
|
||||
generatedAt: { type: 'string' },
|
||||
},
|
||||
required: ['summary', 'why', 'forecast', 'suggestedActions', 'ownerHints', 'generatedAt'],
|
||||
additionalProperties: false,
|
||||
};
|
||||
Reference in New Issue
Block a user