From 174324824d637cdc5ee5aa0c562ed6afdc451fa7 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 1 Feb 2026 14:38:35 -0300 Subject: [PATCH] atlasbot: broaden hottest query detection --- atlasbot/engine/answerer.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/atlasbot/engine/answerer.py b/atlasbot/engine/answerer.py index 0b936da..38cdfe7 100644 --- a/atlasbot/engine/answerer.py +++ b/atlasbot/engine/answerer.py @@ -266,7 +266,7 @@ class AnswerEngine: scored = await _score_chunks(call_llm, chunks, normalized, sub_questions, plan) selected = _select_chunks(chunks, scored, plan, keyword_tokens) key_facts = _key_fact_lines(summary_lines, keyword_tokens) - hottest_facts = _extract_hottest_facts(summary_lines, normalized) + hottest_facts = _extract_hottest_facts(summary_lines, f"{question} {normalized}") metric_facts = [line for line in key_facts if re.search(r"\d", line)] if hottest_facts: metric_facts = hottest_facts @@ -1016,7 +1016,10 @@ def _extract_hottest_facts(lines: list[str], question: str) -> list[str]: if not lines: return [] lowered = question.lower() - if not any(term in lowered for term in ("hottest", "highest", "lowest", "most")): + if not any( + term in lowered + for term in ("hottest", "hot", "highest", "lowest", "most", "top", "peak", "loaded", "load", "busy") + ): return [] line = next((item for item in lines if item.lower().startswith("hottest:")), "") if not line: