feat: optimize async_search

This commit is contained in:
martsforever
2025-11-24 11:45:56 +08:00
parent 791fccb0ad
commit 0c6ca599e3
+1 -2
View File
@@ -98,14 +98,13 @@ class MilvusService:
result_nodes = [node for node in result_nodes if node.score >= 0.3]
chain = ChatPromptTemplate.from_template("""
请根据context标签中的内容来回答用户问题,如果与用户问题相关的内容,请回答"在提供的资料中未找到相关信息";
请从context标签中的内容提取与用户有关的内容来回答用户问题,如果不存在与用户问题相关的内容,请回答"在提供的资料中未找到相关信息";
<context>
{context}
</context>
处理要求:
- 如果检索结果中没有相关信息,请明确回答:"在提供的资料中未找到相关信息"
- 不要添加检索结果之外的额外知识
- 回答时优先使用检索结果中的原文表述