atlasbot: refine follow-up gating
This commit is contained in:
parent
51f3549f09
commit
92c94b2707
@ -248,7 +248,8 @@ class AnswerEngine:
|
|||||||
"pvc",
|
"pvc",
|
||||||
"storage",
|
"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
|
classify["needs_snapshot"] = True
|
||||||
lowered_norm = normalized.lower()
|
lowered_norm = normalized.lower()
|
||||||
if (
|
if (
|
||||||
@ -276,7 +277,11 @@ class AnswerEngine:
|
|||||||
|
|
||||||
if not classify.get("follow_up") and state and state.claims:
|
if not classify.get("follow_up") and state and state.claims:
|
||||||
follow_terms = ("there", "that", "those", "these", "it", "them", "that one", "this", "former", "latter")
|
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:
|
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
|
classify["follow_up"] = True
|
||||||
|
|
||||||
if classify.get("follow_up") and state and state.claims:
|
if classify.get("follow_up") and state and state.claims:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user