atlasbot: heuristic follow-up routing
This commit is contained in:
parent
d4262d66ad
commit
9d495b4f1e
@ -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")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user