Logo Lanfrica

Amine-Gharout/Hybrid-Graph-RAG-System

Domain:

natural language processing

Record type:

software
Creator:
Ami
Host:
GraphRAG system combining ChromaDB (vector search) and Neo4j (graph queries) to analyze Algerian constitutional documents (1996–2020) — educational reference for building hybrid RAG architectures. # Constitutional GraphRAG System A Python project implementing a **Retrieval-Augmented Generation (RAG)** system that combines vector databases (ChromaDB) and graph databases (Neo4j) to analyze and query Algerian constitutional and legal documents (1996-2020). > 💡 **Educational Purpose**: This project serves as a comprehensive demonstration of how to build RAG (Retrieval-Augmented Generation) systems using different data storage approaches. It illustrates three distinct methodologies: **vector database-only** (ChromaDB for semantic search), **graph database-only** (Neo4j for relationship queries), and a **hybrid approach** that combines both vector and graph databases to leverage the strengths of each paradigm. This makes it an excellent reference for understanding when and how to use each approach in real-world applications. ## 📋 Overview This project demonstrates an advanced **GraphRAG architecture** that leverages two complementary approaches for intelligent question-answering: - **Vector-based RAG**: Semantic search through document content using ChromaDB embeddings - **Graph-based RAG**: Relationship queries between legal documents using Neo4j and Cypher - **Hybrid RAG**: Combined approach for complex queries requiring both content and structural information ### 🎯 Key Capabilities - Semantic search across multiple constitution versions and legal texts - Track modifications, citations (visas), and relationships between documents - Answer complex questions about legal document content and structure - Temporal queries (find documents by publication date) - Hierarchical analysis of constitutional authority and document relationships ## 🚀 Features - **Three RAG Modes**: - **Vector-Only**: Content-based questions ("What does the 2020 constitution say?") - **Graph-Only**: Relationship questions ("Which documents modified the constitution?") - **Combined**: Complex questions requiring both approaches - **Advanced Cypher Query Gen …