atlasbot: expand full-pack triggers and strip inline confidence

This commit is contained in:
Brad Stein 2026-01-28 04:06:24 -03:00
parent 043d1cbab3
commit dda943ce16
2 changed files with 10 additions and 3 deletions

View File

@ -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"

View File

@ -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