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.
- 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.
- Ingestion: Documents are chunked and passed to an LLM.
- Graph Construction: The LLM identifies "Subject-Predicate-Object" triplets, which are stored in a Neo4j database.
- Community Detection: The graph is partitioned into communities (clusters) to identify broader themes.
- Querying: When a user asks a question, the system retrieves relevant graph sub-structures and relevant text chunks to generate a grounded response.
- Orchestration: LlamaIndex / LangChain
- Graph Database: Neo4j
- LLM: OpenAI GPT-4o / Claude 3.5 Sonnet
- Embeddings: text-embedding-3-small
- Language: Python 3.10+
- A Neo4j instance (local or AuraDB)
- OpenAI API Key
- 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
To launch the interactive dashboard, run:
streamlit run src/app.py