RAG-Anything
RAG-Anything is an all-in-one multimodal RAG framework built on LightRAG that processes and queries documents containing text, images, tables, equations, and charts through a single interface. It solves the problem of traditional text-only RAG systems failing on mixed-content documents, targeting developers and enterprises dealing with academic papers, technical docs, and financial reports.
✨ Key features
- End-to-end multimodal pipeline from ingestion to query answering
- Universal document support: PDFs, Office, images, and more
- Specialized processors for images, tables, equations, and text
- Multimodal knowledge graph with entity extraction and cross-modal links
- Adaptive parsing with MinerU or direct content list insertion
- Hybrid retrieval combining vector search and graph traversal
🎯 Use cases
- Querying academic papers with figures, tables, and formulas
- Analyzing financial reports with charts and structured data
- Building enterprise knowledge bases from mixed-format documents
- Enabling multimodal Q&A on technical documentation
- Integrating with LightRAG for enhanced multimodal retrieval
📦 Installation
🧰 Requirements: Requires Python, API keys for LLM and vision models (e.g., OpenAI), and optionally LibreOffice for Office documents.
pip install raganythingpip install 'raganything[all]' # All optional features
pip install 'raganything[image]' # Image format conversion
pip install 'raganything[text]' # Text file processingcurl -LsSf https://astral.sh/uv/install.sh | sh
git clone https://github.com/HKUDS/RAG-Anything.git
cd RAG-Anything
uv syncuv run python examples/raganything_example.py --help🚀 Usage
import asyncio
from raganything import RAGAnything, RAGAnythingConfig
from lightrag.llm.openai import openai_complete_if_cache, openai_embed
async def main():
config = RAGAnythingConfig(
working_dir="./rag_storage",
parser="mineru",
parse_method="auto",
enable_image_processing=True,
enable_table_processing=True,
enable_equation_processing=True,
)
rag = RAGAnything(config)
# Add documents and query
await rag.ainsert("path/to/document.pdf")
result = await rag.aquery("What is the main finding?")
print(result)
asyncio.run(main())
❓ FAQ
What document formats are supported?
PDFs, Office documents (DOC/DOCX/PPT/PPTX/XLS/XLSX), images, and text files (TXT, MD) are supported, with optional dependencies for image and text formats.
Do I need to install MinerU separately?
MinerU is integrated and used as the default parser. You can verify installation with mineru --version and check via the RAGAnything class.
Can I use my own LLM and vision models?
Yes, you can define custom model functions for LLM and vision, as shown in the usage example, by passing them to the configuration.
How does RAG-Anything handle images in documents?
It uses a vision model to generate context-aware captions and integrates them into the knowledge graph, enabling multimodal queries.
📊 Repository
🤖 Overview, features, install steps and FAQ were generated from the project's README on Sep 4, 2026. Always check the original source before running commands.