From dda943ce16248b3bc964b04ebf7e247552698a63 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Wed, 28 Jan 2026 04:06:24 -0300 Subject: [PATCH] atlasbot: expand full-pack triggers and strip inline confidence --- services/comms/atlasbot-deployment.yaml | 2 +- services/comms/scripts/atlasbot/bot.py | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/services/comms/atlasbot-deployment.yaml b/services/comms/atlasbot-deployment.yaml index 58a5564..7001190 100644 --- a/services/comms/atlasbot-deployment.yaml +++ b/services/comms/atlasbot-deployment.yaml @@ -16,7 +16,7 @@ spec: labels: app: atlasbot annotations: - checksum/atlasbot-configmap: manual-atlasbot-96 + checksum/atlasbot-configmap: manual-atlasbot-97 vault.hashicorp.com/agent-inject: "true" vault.hashicorp.com/role: "comms" vault.hashicorp.com/agent-inject-secret-turn-secret: "kv/data/atlas/comms/turn-shared-secret" diff --git a/services/comms/scripts/atlasbot/bot.py b/services/comms/scripts/atlasbot/bot.py index 59a8c2d..6f3581f 100644 --- a/services/comms/scripts/atlasbot/bot.py +++ b/services/comms/scripts/atlasbot/bot.py @@ -3030,7 +3030,14 @@ def _ensure_scores(answer: str) -> str: ): _record_score("hallucinationrisk", _extract_value(cleaned)) continue - body_lines.append(line) + cleaned_body = re.sub( + r"\\bconfidence\\s*:\\s*(high|medium|low)\\b\\.?\\s*", + "", + line, + flags=re.IGNORECASE, + ).strip() + if cleaned_body: + body_lines.append(cleaned_body) confidence = score_map.get("confidence") or "medium" relevance = score_map.get("relevance") or "70" @@ -3926,7 +3933,7 @@ def _needs_full_fact_pack(prompt: str) -> bool: tokens = set(_tokens(prompt)) if _is_quantitative_prompt(prompt) or _is_list_prompt(prompt): return True - if tokens & {"workload", "pods", "namespace"}: + if tokens & {"workload", "pods", "namespace", "worker", "workers"}: return True if _NAME_INDEX and tokens & _NAME_INDEX: return True