atlasbot: clean fact labels and non-cluster confidence

This commit is contained in:
Brad Stein 2026-01-28 04:00:13 -03:00
parent da94cc6f97
commit 043d1cbab3
2 changed files with 3 additions and 1 deletions

View File

@ -16,7 +16,7 @@ spec:
labels: labels:
app: atlasbot app: atlasbot
annotations: annotations:
checksum/atlasbot-configmap: manual-atlasbot-95 checksum/atlasbot-configmap: manual-atlasbot-96
vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/role: "comms" vault.hashicorp.com/role: "comms"
vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret"

View File

@ -2945,6 +2945,7 @@ def _open_ended_system() -> str:
"If the question is ambiguous, pick a reasonable interpretation and state it briefly. " "If the question is ambiguous, pick a reasonable interpretation and state it briefly. "
"Avoid repeating the exact same observation as the last response if possible; vary across metrics, workload, or hardware details. " "Avoid repeating the exact same observation as the last response if possible; vary across metrics, workload, or hardware details. "
"Always include at least one substantive answer sentence before the score lines. " "Always include at least one substantive answer sentence before the score lines. "
"Do not mention fact IDs or internal labels (e.g., F1/F2) in your response. "
"When the fact pack includes hottest_cpu/ram/net/io lines, use them to answer hottest/busiest node questions. " "When the fact pack includes hottest_cpu/ram/net/io lines, use them to answer hottest/busiest node questions. "
"When the fact pack includes postgres_hottest_db, use it for questions about the busiest database. " "When the fact pack includes postgres_hottest_db, use it for questions about the busiest database. "
"Do not invent numbers or facts. " "Do not invent numbers or facts. "
@ -4091,6 +4092,7 @@ def _non_cluster_reply(prompt: str, *, history_lines: list[str], mode: str) -> s
system_override=system, system_override=system,
model=model, model=model,
) )
reply = re.sub(r"\\bconfidence\\s*:\\s*(high|medium|low)\\b\\.?\\s*", "", reply, flags=re.IGNORECASE).strip()
return _ensure_scores(reply) return _ensure_scores(reply)