From 9d495b4f1ead25e034bc3ddbf695f9baaf3b9988 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Mon, 2 Feb 2026 02:58:19 -0300 Subject: [PATCH] atlasbot: heuristic follow-up routing --- atlasbot/engine/answerer.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/atlasbot/engine/answerer.py b/atlasbot/engine/answerer.py index fab840a..2c3b4a9 100644 --- a/atlasbot/engine/answerer.py +++ b/atlasbot/engine/answerer.py @@ -243,6 +243,11 @@ class AnswerEngine: 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 not classify.get("follow_up") and state and state.claims: + follow_terms = ("there", "that", "those", "these", "it", "them", "that one", "this", "former", "latter") + if any(term in lowered_question for term in follow_terms) or len(normalized.split()) <= 6: + classify["follow_up"] = True + if classify.get("follow_up") and state and state.claims: if observer: observer("followup", "answering follow-up")