feat(GraphRAG): enhance GraphRAG by graph community summary (#1801)

Co-authored-by: Florian <fanzhidongyzby@163.com>
Co-authored-by: KingSkyLi <15566300566@163.com>
Co-authored-by: aries_ckt <916701291@qq.com>
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
Co-authored-by: yvonneyx <zhuyuxin0627@gmail.com>
This commit is contained in:
M1n9X
2024-08-30 21:59:44 +08:00
committed by GitHub
parent 471689ba20
commit 759f7d99cc
59 changed files with 29316 additions and 411 deletions

View File

@@ -54,6 +54,10 @@ class IndexStoreBase(ABC):
"""Init index store."""
self._executor = executor or ThreadPoolExecutor()
@abstractmethod
def get_config(self) -> IndexStoreConfig:
"""Get the index store config."""
@abstractmethod
def load_document(self, chunks: List[Chunk]) -> List[str]:
"""Load document in index database.
@@ -104,6 +108,10 @@ class IndexStoreBase(ABC):
ids(str): The vector ids to delete, separated by comma.
"""
@abstractmethod
def truncate(self) -> List[str]:
"""Truncate data by name."""
@abstractmethod
def delete_vector_name(self, index_name: str):
"""Delete index by name.
@@ -188,7 +196,7 @@ class IndexStoreBase(ABC):
Return:
List[Chunk]: The similar documents.
"""
return self.similar_search_with_scores(text, topk, 1.0, filters)
return self.similar_search_with_scores(text, topk, 0.0, filters)
async def asimilar_search_with_scores(
self,