Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NexusGraph RAG: Knowledge-Graph Augmented Generation

NexusGraph RAG is a sophisticated retrieval system that goes beyond simple vector similarity search. By extracting entities and relationships from unstructured text and storing them in a structured Knowledge Graph, it enables the LLM to reason over complex connections and provide holistic insights across large datasets.

🚀 Key Features

  • Entity-Relation Extraction: Automatically identifies key nodes and edges from raw text using LLMs.
  • Graph-Native Retrieval: Uses Cypher queries to navigate the graph, finding 2nd and 3rd-degree connections that standard RAG would miss.
  • Hybrid Search: Combines vector embeddings with graph traversals for maximum context accuracy.
  • Global Insight Generation: Summarizes clusters of related nodes to answer high-level thematic questions.

🏗️ How it Works

  1. Ingestion: Documents are chunked and passed to an LLM.
  2. Graph Construction: The LLM identifies "Subject-Predicate-Object" triplets, which are stored in a Neo4j database.
  3. Community Detection: The graph is partitioned into communities (clusters) to identify broader themes.
  4. Querying: When a user asks a question, the system retrieves relevant graph sub-structures and relevant text chunks to generate a grounded response.

🛠️ Tech Stack

  • Orchestration: LlamaIndex / LangChain
  • Graph Database: Neo4j
  • LLM: OpenAI GPT-4o / Claude 3.5 Sonnet
  • Embeddings: text-embedding-3-small
  • Language: Python 3.10+

🚦 Getting Started

Prerequisites

  • A Neo4j instance (local or AuraDB)
  • OpenAI API Key

Installation

  1. Clone the repository:
    git clone [https://github.com/your-username/nexus-graph-rag.git](https://github.com/your-username/nexus-graph-rag.git)
    cd nexus-graph-rag
    

🖥️ User Interface

To launch the interactive dashboard, run:

streamlit run src/app.py

About

graphrag_template

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages