Skip to content

Commit

Permalink
feat: Knowledge Graph Retriever (#35)
Browse files Browse the repository at this point in the history
* Added methods for loading of knowledge_graph index and retrieval from Knowledge graph

* added README.MD

* Added an colab example of graph_retrieval module and some modifications in module
  • Loading branch information
debrupf2946 authored Jul 6, 2024
1 parent daa3a95 commit 2b23cf1
Show file tree
Hide file tree
Showing 4 changed files with 1,076 additions and 0 deletions.
2 changes: 2 additions & 0 deletions graph_rag/graph_builder/knowledgeGraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def build_graph(
llm: str = None,
max_triplets_per_chunk: int = 10,
embeddings: str = "microsoft/codebert-base",
include_embeddings: bool = False,
):
"""
This function builds KnowledgeGraph Index that can be queried
Expand All @@ -37,6 +38,7 @@ def build_graph(
llm=llm,
embed_model=HuggingFaceEmbedding(model_name=embeddings),
storage_context=storage_context,
include_embeddings=include_embeddings,
)
print("KG built successfully!")

Expand Down
Loading

0 comments on commit 2b23cf1

Please sign in to comment.