From 8a4ac352cd8458a18b7847ce68776867f105cbd5 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 2 Feb 2026 12:01:05 -0300 Subject: [PATCH] feat: prefer full hottest line for hotspot questions --- atlasbot/engine/answerer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atlasbot/engine/answerer.py b/atlasbot/engine/answerer.py index 9e87ca2..27a2dc9 100644 --- a/atlasbot/engine/answerer.py +++ b/atlasbot/engine/answerer.py @@ -308,6 +308,11 @@ class AnswerEngine: elif hardware_facts: metric_facts = hardware_facts key_facts = _merge_fact_lines(metric_facts, key_facts) + if any(term in lowered_q for term in ("hot spot", "hotspot", "hot spots", "hotspots")): + hottest_line = next((line for line in summary_lines if line.startswith("hottest:")), None) + if hottest_line: + metric_facts = [hottest_line] + key_facts = _merge_fact_lines(metric_facts, key_facts) if classify.get("question_type") in {"metric", "diagnostic"}: if focus_entity != "node" and any(tok in lowered_q for tok in ("hardware", "class", "type", "rpi", "jetson", "amd64", "arm64")) and any( tok in lowered_q for tok in ("average", "avg", "mean", "ram", "memory", "cpu", "load")