atlasbot: heuristic follow-up routing

This commit is contained in:
Brad Stein 2026-02-02 02:58:19 -03:00
parent d4262d66ad
commit 9d495b4f1e

View File

@ -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): 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" 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 classify.get("follow_up") and state and state.claims:
if observer: if observer:
observer("followup", "answering follow-up") observer("followup", "answering follow-up")