atlasbot: detect baseline trend metrics

This commit is contained in:
Brad Stein 2026-02-03 23:51:13 -03:00
parent 9716755fdb
commit 692b059b52
2 changed files with 5 additions and 0 deletions

View File

@ -285,6 +285,10 @@ class AnswerEngine:
metric_terms = ("cpu", "ram", "memory", "net", "network", "io", "disk", "load", "usage", "pod", "pods", "namespace")
if any(term in lowered_question for term in hottest_terms) and any(term in lowered_question for term in metric_terms):
classify["question_type"] = "metric"
baseline_terms = ("baseline", "delta", "trend", "increase", "decrease", "drop", "spike", "regression", "change")
if any(term in lowered_question for term in baseline_terms) and any(term in lowered_question for term in metric_terms):
classify["question_type"] = "metric"
classify["needs_snapshot"] = True
if not classify.get("follow_up") and state and state.claims:
follow_terms = ("there", "that", "those", "these", "it", "them", "that one", "this", "former", "latter")

View File

@ -26,6 +26,7 @@ ROUTE_SYSTEM = (
+ "Assume questions are about the Titan Lab Atlas Kubernetes cluster unless the user explicitly asks about something else. "
+ "Prefer snapshot evidence when available. "
+ "If the question asks for hottest/highest/lowest CPU/RAM/NET/IO/Disk nodes, mark it as a metric question and require snapshot evidence. "
+ "If the question asks about baselines, deltas, trends, increases/decreases, drops, spikes, or time-based comparisons, mark it as metric or diagnostic and require snapshot evidence. "
+ "Return JSON only."
)