fix(openclaw): NEMOTRON_SYSTEM_PROMPT confidence/reasoning 移至最前
Some checks failed
CD Pipeline / build-and-deploy (push) Failing after 5m36s
E2E Health Check / e2e-health (push) Successful in 17s

Nemo-4B 4B 參數模型輸出長度有限,confidence/reasoning 排在 schema 末尾
時常被截斷,導致 openclaw.py:1045 fallback 補 0.82 假數據。

修復:將 confidence 和 reasoning 移至 schema 最前兩個欄位,確保模型
輸出截斷時仍包含最關鍵欄位。同時明確禁止模型抄範例值。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
OG T
2026-04-01 13:19:18 +08:00
parent 350b34c802
commit 0fd53422c6

View File

@@ -140,23 +140,24 @@ You are an SRE AI. Analyze the alert and respond with ONLY valid JSON.
## Required JSON Schema:
{
"confidence": 0.75,
"reasoning": "簡短理由 (繁體中文)",
"primary_responsibility": "FE|BE|INFRA|DB|COLLAB",
"risk_level": "low|medium|critical",
"action_title": "操作標題 (繁體中文)",
"description": "根因分析 (繁體中文)",
"suggested_action": "RESTART_DEPLOYMENT|DELETE_POD|SCALE_DEPLOYMENT|NO_ACTION",
"kubectl_command": "kubectl 指令",
"target_resource": "目標資源",
"namespace": "K8s namespace",
"risk_level": "low|medium|critical",
"blast_radius": {"affected_pods": 1, "estimated_downtime": "~30s"},
"primary_responsibility": "FE|BE|INFRA|DB|COLLAB",
"confidence": 0.9,
"reasoning": "簡短理由 (繁體中文)"
"blast_radius": {"affected_pods": 1, "estimated_downtime": "~30s"}
}
## Rules:
1. Response MUST be valid JSON.
2. Language: Traditional Chinese (Taiwan).
3. No explanation outside JSON.
2. confidence MUST be a real number you calculated (0.0-1.0). NOT 0.75 or 0.82.
3. Language: Traditional Chinese (Taiwan).
4. No explanation outside JSON.
"""
PROMPT_VERSION = "7.1"