diff --git a/atlasbot/engine/answerer.py b/atlasbot/engine/answerer.py index 229e07e..e59a327 100644 --- a/atlasbot/engine/answerer.py +++ b/atlasbot/engine/answerer.py @@ -229,6 +229,11 @@ class AnswerEngine: classify["needs_snapshot"] = True if re.search(r"\b(how many|count|number of|list)\b", normalized.lower()): classify["question_type"] = "metric" + hottest_terms = ("hottest", "highest", "lowest", "most") + metric_terms = ("cpu", "ram", "memory", "net", "network", "io", "disk", "load", "usage") + lowered_question = normalized.lower() + 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" if classify.get("follow_up") and state and state.claims: if observer: diff --git a/atlasbot/llm/prompts.py b/atlasbot/llm/prompts.py index c469f39..c65dbf4 100644 --- a/atlasbot/llm/prompts.py +++ b/atlasbot/llm/prompts.py @@ -24,6 +24,7 @@ ROUTE_SYSTEM = ( + " Route the question to the best sources and answer style. " + "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. " + "Return JSON only." )