A newer version of the Gradio SDK is available:
5.25.0
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)