Back to Projects

GraphRAG Agent: Knowledge Graph RAG System

PythonNeo4jFastAPICeleryRedisLlamaIndexGoogle Gemini 2.0Docker
View on GitHub
Showcase image for GraphRAG Agent: Knowledge Graph RAG System

The Challenge

Traditional Retrieval-Augmented Generation (RAG) systems rely on isolated text chunks, losing the rich relationships between entities. This leads to fragmented, context-poor answers that fail to capture the interconnected nature of real-world knowledge. The goal was to build a system that understands and leverages relationships for superior question answering.

My Solution

I designed and implemented an autonomous GraphRAG pipeline that goes beyond conventional RAG by dynamically scraping the web, extracting structured entities and relationships, and constructing a web-scale knowledge graph for context-aware retrieval.

Key Features & Technical Implementation:

  • Autonomous Web Scraping Pipeline: Built an automated system that dynamically scrapes web content, extracts relevant information, and feeds it into the knowledge graph construction pipeline using Celery for distributed task processing and Redis for message brokering.

  • Knowledge Graph Construction: Leveraged Neo4j as the graph database to store extracted entities and their relationships, creating a rich, interconnected knowledge representation that captures semantic meaning far beyond flat text storage.

  • Context-Aware Sub-Graph Retrieval: Instead of retrieving isolated text chunks, the system retrieves connected sub-graphs from the knowledge graph, providing the LLM with rich contextual information that significantly improves answer accuracy and explainability.

  • Production-Ready Architecture: Built with FastAPI for the REST API layer, Docker for containerization, and LlamaIndex with Google Gemini 2.0 for the generation layer, creating a scalable and deployable production system.

This project showcases expertise in graph databases, distributed systems, and cutting-edge RAG architectures for building next-generation AI applications.