From d7c8a212cd1095e0659565dc5e052e72e79ee848 Mon Sep 17 00:00:00 2001 From: vichayturen <1073931273@qq.com> Date: Mon, 12 Aug 2024 01:27:42 +0800 Subject: [PATCH] chore: change todos in rerank method --- .../hugegraph_llm/operators/common_op/merge_dedup_rerank.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hugegraph-llm/src/hugegraph_llm/operators/common_op/merge_dedup_rerank.py b/hugegraph-llm/src/hugegraph_llm/operators/common_op/merge_dedup_rerank.py index af6ce6a6..19ad4e47 100644 --- a/hugegraph-llm/src/hugegraph_llm/operators/common_op/merge_dedup_rerank.py +++ b/hugegraph-llm/src/hugegraph_llm/operators/common_op/merge_dedup_rerank.py @@ -35,10 +35,7 @@ def __init__(self, embedding: BaseEmbedding, topk: int = 10): self.topk = topk def run(self, context: Dict[str, Any]) -> Dict[str, Any]: - # TODO: 逻辑应该是: - # 1. 分词后优先关键词匹配 vid (直接匹配) - # 2. 匹配不到,尝试退化模糊vid召回(并提示用户是否想问的是xxx) - # 3. 之后我们可以把chunk/graph加上,查询的时候可以同时查询关键词对应的chunk,然后一起综合(进阶) + # TODO: exact > fuzzy; vertex > 1-depth-neighbour > 2-depth-neighbour; priority vertices query = context.get("query") vector_result = context.get("vector_result", [])