atlasbot: refine follow-up gating
This commit is contained in:
parent
51f3549f09
commit
92c94b2707
@ -248,7 +248,8 @@ class AnswerEngine:
|
||||
"pvc",
|
||||
"storage",
|
||||
)
|
||||
if any(term in lowered_question for term in cluster_terms):
|
||||
has_cluster_terms = any(term in lowered_question for term in cluster_terms)
|
||||
if has_cluster_terms:
|
||||
classify["needs_snapshot"] = True
|
||||
lowered_norm = normalized.lower()
|
||||
if (
|
||||
@ -276,8 +277,12 @@ class AnswerEngine:
|
||||
|
||||
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()) <= FOLLOWUP_SHORT_WORDS:
|
||||
classify["follow_up"] = True
|
||||
is_metric_query = force_metric or classify.get("question_type") in {"metric", "diagnostic"}
|
||||
if not is_metric_query:
|
||||
if any(term in lowered_question for term in follow_terms):
|
||||
classify["follow_up"] = True
|
||||
elif len(normalized.split()) <= FOLLOWUP_SHORT_WORDS and not has_cluster_terms:
|
||||
classify["follow_up"] = True
|
||||
|
||||
if classify.get("follow_up") and state and state.claims:
|
||||
if observer:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user