引入工单后,匹配软件词条辅助性不大且该环节上下文较长,Token消耗较大

This commit is contained in:
2025-07-29 09:22:05 +08:00
parent ba42107999
commit 57369059eb
@@ -418,7 +418,7 @@ class AsyncIntentRecognizer:
asyncio.create_task(self._generate_step_back_prompt_async(query, chat_history, conversation_context)),
# 文档查询
asyncio.create_task(self._find_matching_software_docs_async(query, cur_soft_name, chat_history)),
# asyncio.create_task(self._find_matching_software_docs_async(query, cur_soft_name, chat_history)),
]
# 执行关键词匹配
@@ -470,19 +470,19 @@ class AsyncIntentRecognizer:
# 收集结果
step_back_result = query_expand_results[0] if query_expand_results[0] else StepBackPrompt(original_query=query, can_use_back_prompt=False, step_back_query=[query])
wiki_result = query_expand_results[1] if query_expand_results[1] else []
# wiki_result = query_expand_results[1] if query_expand_results[1] else []
all_questions=[]
all_questions.append(query)
all_questions.append(rewrite.rewrite)
all_questions.extend(wiki_result)
# all_questions.extend(wiki_result)
all_questions.extend(step_back_result.step_back_query)
all_questions = list(set(all_questions))
query_expand = {
"all": all_questions,
"step_back": step_back_result.step_back_query,
"wiki_title": wiki_result,
# "wiki_title": wiki_result,
"original_query":query,
"rewrite_query":rewrite.rewrite
}