GraphRAG is a Microsoft Research project that implements a graph-based retrieval-augmented generation (RAG) system. It extracts structured knowledge (entities, relationships, claims) from unstructured text using LLMs, builds a hierarchical knowledge graph via Leiden community detection, generates community summaries, and supports multiple query strategies: local search (entity-centric), global search (map-reduce over community reports), DRIFT search (iterative multi-hop), and basic vector search. The system is designed as a Python library with a CLI (Typer) and a public API, plus a Streamlit demo app for comparing search modes. It provides extensive configuration via YAML/JSON with environment variable substitution, and supports multiple backends for storage (file, Azure Blob, CosmosDB), caching (SQLite, JSON, memory), vector stores (LanceDB, Azure AI Search, CosmosDB), and LLM providers (OpenAI, Azure OpenAI, LiteLLM). The codebase is organized as a monorepo with eight sub-packages (graphrag, graphrag-llm, graphrag-storage, graphrag-vectors, graphrag-cache, graphrag-input, graphrag-chunking, graphrag-common), each with its own pyproject.toml and versioning. The project is explicitly in maintenance mode, accepting only bug fixes and dependency updates, with no new features planned. Despite this, the architecture is well-structured with clean abstractions, factory patterns, middleware pipelines, and a composable design that makes many components reusable in other projects.
This repository is a full-stack application for building knowledge graphs from unstructured data using Large Language Models (LLMs). The backend, built with FastAPI and LangChain, ingests documents from multiple sources (local files, web pages, YouTube, Wikipedia, S3, GCS), chunks them, and uses an LLM to extract entities and relationships, which are stored in a Neo4j graph database. The frontend, a React/TypeScript application, provides a user interface for uploading files, configuring extraction (schema, LLM model, chunking), visualizing the resulting graph, and interacting with the data through a retrieval-augmented generation (RAG) chatbot with multiple retrieval modes (vector, graph, fulltext, hybrid). The system includes post-processing features like community detection, deduplication, and orphan node cleanup, as well as token usage tracking and evaluation metrics (RAGAS). While primarily an application with a web UI, it also contains experimental notebooks (GraphRAG, chunk size evaluation) that serve a data research purpose, making it a hybrid codebase with a dominant application character.