agent功能开发增加MCP后端
This commit is contained in:
@@ -490,7 +490,7 @@ def build_hybrid_knn_query(
|
||||
"field": "description_embedding",
|
||||
"query_vector": embedding,
|
||||
"k": k,
|
||||
"num_candidates": min(k * 2, 500),
|
||||
"num_candidates": max(k + 50, min(k * 2, 10000)), # 确保 num_candidates > k,最大 10000
|
||||
"boost": semantic_weight
|
||||
}
|
||||
}
|
||||
@@ -591,7 +591,7 @@ async def search_concepts(request: SearchRequest):
|
||||
"field": "description_embedding",
|
||||
"query_vector": embedding,
|
||||
"k": effective_search_size, # 使用有效搜索大小
|
||||
"num_candidates": min(effective_search_size * 2, 1000)
|
||||
"num_candidates": max(effective_search_size + 50, min(effective_search_size * 2, 10000)) # 确保 num_candidates > k
|
||||
},
|
||||
"size": effective_search_size
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user