From a807501ba4cccd13dace8a2e63a125e745335916 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Wed, 4 Feb 2026 14:34:01 -0300 Subject: [PATCH] atlasbot: force direct metric reply for count questions --- atlasbot/engine/answerer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/atlasbot/engine/answerer.py b/atlasbot/engine/answerer.py index 8ee3da4..e315986 100644 --- a/atlasbot/engine/answerer.py +++ b/atlasbot/engine/answerer.py @@ -652,7 +652,9 @@ class AnswerEngine: model=plan.fast_model, tag="metric_direct", ) - if not _reply_matches_metric_facts(reply, [direct_line], all_tokens): + if mode == "quick" and any(term in normalized.lower() for term in ("how many", "count", "total")): + reply = _format_direct_metric_line(direct_line) + elif not _reply_matches_metric_facts(reply, [direct_line], all_tokens): reply = _format_direct_metric_line(direct_line) if "raspberry" in lowered_question and "not" in lowered_question: