atlasbot: favor factual fallback in fast mode

This commit is contained in:
Brad Stein 2026-01-28 04:10:31 -03:00
parent dda943ce16
commit 436e56c5de
2 changed files with 6 additions and 1 deletions

View File

@ -16,7 +16,7 @@ spec:
labels:
app: atlasbot
annotations:
checksum/atlasbot-configmap: manual-atlasbot-97
checksum/atlasbot-configmap: manual-atlasbot-98
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

@ -2948,6 +2948,7 @@ def _open_ended_system() -> str:
"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 postgres_hottest_db, use it for questions about the busiest database. "
"Do not convert counts into percentages or claim 100% unless a fact explicitly states a percentage. "
"Do not invent numbers or facts. "
"End with lines: Confidence, Relevance (0-100), Satisfaction (0-100), HallucinationRisk (low|medium|high)."
)
@ -4007,6 +4008,10 @@ def _open_ended_fast(
selected_pack = _fact_pack_text(selected_lines, selected_meta)
if _needs_full_fact_pack(prompt) or not selected_lines:
selected_pack = fact_pack
if not subjective and _needs_full_fact_pack(prompt):
fallback = _fallback_fact_answer(prompt, fact_pack)
if fallback:
return _ensure_scores(fallback)
if state:
state.total_steps = _open_ended_total_steps("fast")
return _open_ended_fast_single(