fix(openclaw): optimize for Nemo-4B with lightweight prompt and resilient parsing
All checks were successful
E2E Health Check / e2e-health (push) Successful in 26s

This commit is contained in:
OG T
2026-03-31 15:59:58 +08:00
parent 8b7f99b5fa
commit d03668669b
2 changed files with 44 additions and 12 deletions

View File

@@ -6,6 +6,7 @@ ADR-019: System Prompt 集中管理
所有 OpenClaw 相關的 System Prompt 集中在此檔案:
1. OPENCLAW_SYSTEM_PROMPT - 生產環境完整 Prompt
2. OPENCLAW_TEST_PROMPT - 測試用精簡 Prompt
3. NEMOTRON_SYSTEM_PROMPT - NVIDIA Nemo-4B 專用超精簡版 (vfix16)
版本: v1.0
建立: 2026-03-26 (台北時區)
@@ -130,8 +131,33 @@ OPENCLAW_TEST_PROMPT = """你是 AWOOOI AIOps 平台的智慧助手 OpenClaw。
# =============================================================================
# 版本資訊
# NVIDIA Nemotron-mini-4B 專用超精簡版 (Phase 21.6 vfix16)
# 優化點: 減少文字敘述,強制輸出扁平化結構,適配 4K Context
# =============================================================================
NEMOTRON_SYSTEM_PROMPT = """# OpenClaw Lightweight (Nemo-4B Optimized)
You are an SRE AI. Analyze the alert and respond with ONLY valid JSON.
## Required JSON Schema:
{
"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": "簡短理由 (繁體中文)"
}
## Rules:
1. Response MUST be valid JSON.
2. Language: Traditional Chinese (Taiwan).
3. No explanation outside JSON.
"""
PROMPT_VERSION = "7.1"
PROMPT_UPDATED = "2026-03-26"