LightRAG
A self-hosted RAG framework that combines knowledge graphs and vector retrieval to answer document questions with local or hosted models.
LightRAG is a self-hosted framework for developers building AI assistants that answer questions across documents. It connects related facts across files, including material where relationships matter, such as legal and financial records.
- Cross-document retrieval: Combine entity relationships, detailed facts and broader concepts as context for answers.
- Mixed-content documents: Use text, images, tables and formulas in queries, with document processing through MinerU, Docling or native parsing.
- Document structure: Split content along headings, paragraphs and table boundaries where possible; native Word parsing can also correct inconsistent section headings.
- Knowledge base updates: Add content incrementally or delete selected documents, rebuilding affected entities and relationships.
- Application access: Use the browser interface to work with the framework or connect another application through its REST API.
LightRAG is an open-source Python framework under the MIT license, with Docker deployment available. Local model recommendations include Qwen3-30B-A3B-Instruct for relationship extraction and Qwen3.6-35B-A3B for image input. Hosted choices include Claude Haiku; requests to hosted models go to the external provider.
Extraction and answering can use different models. Relationship extraction requires more capable models than traditional RAG, and the answer model must handle long retrieved context.