Metadata-Version: 2.1
Name: knowledge-graph-rag
Version: 0.0.2
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy (==1.26.0)
Requires-Dist: networkx (==3.2.1)
Requires-Dist: nltk (==3.8.1)
Requires-Dist: litellm (==1.34.0)

# Knowledge Graph RAG
## Create a graph of interconnected documents and boost performance on RAG

### 1. Install Knowledge Graph RAG:

`pip install knowledge_graph_rag`

### 2. Create a Document Graph:


```
documents = ["Cardiovascular disease ...",
             "Emerging therapeutic interventions ...",
             "The epidemiological burden ...
             "Cardiovascular disease also ...",
             "Advanced imaging techniques, ...",
             "Role of novel biomarkers ..."
]

documents_graph = DocumentsGraph(documents=documents)
documents_graph.plot()
```

![alt text](assets/image.png)

### 3. Find interconnected documents
```
documents_containing_connected_terminology = documents_graph.find_connected_documents(vectordb_search_result)
documents_containing_connected_terminology
```

```
[{'document': 'emerging therapeutic intervention ...'},
 {'document': 'management cardiovascular ...'},
 {'document': 'role novel biomarkers ...'}]
 ```
