atlasbot: tighten insight phrasing

This commit is contained in:
Brad Stein 2026-01-27 18:45:49 -03:00
parent 51bf01a8fd
commit 4e51cf6b6c
2 changed files with 12 additions and 8 deletions

View File

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

@ -1721,17 +1721,21 @@ def _format_insight_text(key: str, text: str) -> str:
.strip()
.strip(".")
)
return f"the mixed hardware stack ({counts}) is a bit unconventional for a homelab."
return f"mixed hardware stack ({counts}), which is unusual for a homelab."
if key == "postgres":
detail = cleaned.replace("Postgres is at ", "")
return f"Postgres looks healthy at {detail}; that suggests moderate load."
return f"Postgres is at {detail}; that suggests moderate load."
if key == "pods":
detail = cleaned.replace("There are ", "")
return f"Pods look stable with {detail}."
if key == "availability":
return cleaned + "."
if key in ("cpu", "ram"):
suffix = " That likely marks the busiest workload right now." if key == "cpu" else " That box is carrying the heaviest memory load."
suffix = (
" That likely marks the busiest workload right now."
if key == "cpu"
else " That box is carrying the heaviest memory load."
)
return cleaned + "." + suffix
return cleaned + "."
@ -1739,19 +1743,19 @@ def _format_insight_text(key: str, text: str) -> str:
def _insight_prefix(prompt: str) -> str:
q = normalize_query(prompt)
if "coolest" in q:
return "If I had to pick the coolest detail, it's "
return "If I had to pick the coolest detail: "
if "favorite" in q or "favourite" in q:
return "My favorite detail is "
return "My favorite detail: "
if "trivia" in q:
return "A bit of trivia I like: "
if "most interesting" in q:
return "The most interesting detail to me is "
return "The most interesting detail to me: "
if any(word in q for word in ("another", "else", "different", "other")):
return "Another interesting detail: "
if any(word in q for word in ("unconventional", "weird", "odd", "unique", "surprising")):
return "What stands out is that "
if any(word in q for word in ("interesting", "notable", "fun", "cool")):
return "One thing I'd highlight is "
return "One thing I'd highlight: "
return ""