File size: 2,045 Bytes
f7ab812 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# **GraphRAG**
GraphRAG is a Python-based framework designed to build, manage, and query **Graph Retrieval-Augmented Generation (GraphRAG)** systems. It combines advanced graph processing tools like **Neo4j** and **NetworkX** with natural language capabilities powered by **LLMs (Large Language Models)** to create, visualize, and query knowledge graphs.
---
## **Features**
- **Knowledge Graph Construction**: Extract entities and relationships from text and construct a knowledge graph.
- **Graph Management**:
- Store and query graphs in **Neo4j**.
- Perform analysis and operations on **NetworkX** graphs.
- **Graph Summarization**: Analyze and summarize communities within the graph.
- **Natural Language Interaction**: Generate answers to queries using the knowledge graph and language models.
- **Interactive Visualization**: Explore and interact with knowledge graphs using **Gradio**.
- **Modular Design**: A highly organized and reusable codebase for scalable development.
---
## **File Structure**
βββ graphRAG # Main project directory
βββ init.py #Marks the directory as a Python package
βββ main.py # Entry point to run the GraphRAG pipeline
βββ community_summaries.pkl # Serialized summaries of graph communities
βββ entities_extraction.py # Extract entities and relationships from text
βββ generating_answers.py # Generate answers to queries using the graph
βββ get_communities.py # Identify and analyze graph communities
βββ gradio_viz.py # Gradio-based interactive graph visualization
βββ graph_builder.py # Build the knowledge graph
βββ graph_nx.py # Manage and analyze NetworkX-based graphs
βββ KG_classes.py # Defines classes for knowledge graph objects
βββ subgraphs.py # Extract and manage subgraphs
βββ utils.py # Shared utility functions
βββ graph.gpickle # Serialized NetworkX graph file
βββ README.md # Project documentation (this file) |