← Open Source
Alibaba-NLP

ViDoRAG

[EMNLP 2025] ViDoRAG: Visual Document Retrieval-Augmented Generation via Dynamic Iterative Reasoning Agents.

AI EngineeringGive agent knowledgePython
Open on GitHub
Momentum
+0stars in 24 hours0.0%
670
Stars
51
Forks
+-1
This week
2
Contributors
Created 2025-02-25 · Updated 2026-10-14 · #15219 today
Top developers
wang-qiuchenXavierZXY

Alibaba-NLP/ViDoRAG is ranked 15,219 with 670 stars.

Same-category comparison

Alibaba-NLP/ViDoRAG is ranked 15,219 among these 8 peers; zinja-coder/apktool-mcp-server is ranked 15,218.

Same-category comparison
NameRankMetrics
NickTikhonov/shuo15,207
Language:
Python
Stars:
671
Forks:
67
Description:
sub-500ms latency phone agent orchestration.
arinspunk/claude-talk-to-figma-mcp15,210
Language:
TypeScript
Stars:
671
Forks:
131
Description:
A Model Context Protocol (MCP) that allows Claude Desktop and other AI tools (Claude Code, Cursor, Antigravity, etc.) to read, analyze, and modify Figma designs.
marv1nnnnn/llm-min.txt15,213
Language:
Python
Stars:
671
Forks:
15
Description:
Min.js Style Compression of Tech Docs for LLM Context.
zinja-coder/apktool-mcp-server15,218
Language:
Python
Stars:
671
Forks:
68
Description:
A MCP Server for APK Tool (Part of Android Reverse Engineering MCP Suites).
henrydaum/second-brain15,223
Language:
Python
Stars:
670
Forks:
88
Description:
Second Brain is an agentic framework that acts as an operating system, using local file intelligence, workflow automation, and LLMs to complete tasks and communicate over multiple modalities and messaging platforms.
codag-megalith/codag-visualizer15,249
Language:
TypeScript
Stars:
668
Forks:
65
Description:
Visualize AI/LLM workflows in your codebase.
sunnweiwei/RankGPT15,264
Language:
Python
Stars:
667
Forks:
67
Description:
Is ChatGPT Good at Search. LLMs as Re-Ranking Agent [EMNLP 2023 Outstanding Paper Award].
Superflows-AI/superflows15,268
Language:
TypeScript
Stars:
666
Forks:
77
Description:
Open-source toolkit to build an AI copilot for SaaS products.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguagePython
CategoryAI Engineering
SubcategoryGive agent knowledge
Stars670
Forks51
Contributors2
Created date2025-02-25
Updated date2026-10-14
Stars in 1 day0
Stars in 7 days-1
Rank15,219
Previous rank15,040
Rank change-179
7-day stars rank17,744
Previous 7-day stars rank17,700
7-day stars rank change-44
Total stars rank15,391
Previous total stars rank15,364
Total stars rank change-27
CountryChina
README summary

🎉 Our framework integrates various embedding models, enabling you to create your own retriever. 🎉 We have released the ViDoSeek dataset, which is suitable for Retrieval-augmented Generation in the large visually rich document collection. 🚀Overview We introduce **ViDoSeek**, a benchmark specifically designed for visually rich document retrieval-reason-answer, fully suited for evaluation of RAG within large document corpus. We propose **ViDoRAG**, a novel RAG framework that utilizes a multi-agent, actor-critic paradigm for iterative reasoning, enhancing the noise robustness

of generation models. We introduce a GMM-based multi-modal hybrid retrieval strategy to effectively integrate visual and textual pipelines. Extensive experiments demonstrate the effectiveness of our method. ViDoRAG significantly outperforms strong baselines, achieving over 10% improvement, thus establishing a new state-of-the-art on ViDoSeek. 🔍ViDoSeek Dataset We release our ViDoSeek dataset which designed for visually rich document retrieval-reason-answer. In ViDoSeek, each query has a unique answer and specific reference pages. The provided JSON structure includes

a unique identifier (uid) to distinguish queries, the query content (query), a reference answer (reference_answer), and metadata (meta_info) containing the original file name (file_name), reference page numbers (reference_page), data source type (source_type), and query type (query_type): You can use Git LFS to download annotation files and original documents from Hugging Face or ModelScope. Download the dataset Then, you can use the following script to convert the original file into images: Optionally, you can use

OCR models or Vision-Language Models (VLMs) to recognize text within images: 💻 Running ViDoRAG ViDoRAG is a novel multi-agent RAG framework tailored for complex reasoning across visual documents. ViDoRAG employs a Gaussian Mixture Model (GMM)-based hybrid strategy to effectively handle multi-modal retrieval. Dependencies Or you can use to install the dependencies: We recommend following the guidance of the Colpali-engine and the Transformer library to install the most suitable version. ⚠️ During our code review process, we discovered

that the latest versions of Transformer, Llama Index, Copali Engine, and Qwen 2. We recommend setting up separate environments for retriever and generation tasks. Detailed guidelines will be provided later. You can also use individual modules independently: Step1. Build the Index Database Our framework is built on the foundation of the Llama-Index. We preprocess the corpus in advance and then establish an index database. Before embedding the whole dataset, you can run to check whether the embedding model is

loaded correctly: Then, you can run to embedding the whole dataset: Step2. Run Multi-Modal Retriever Try using the basic single-modal search engine: Try using the dynamic single-modal search engine with GMM: Try using the dynamic hybrid multi-modal search engine: Optionally, you can choose to test these features in . Run Multi-Agent Generation You can directly use our script for generation in , or you can integrate it into your own framework: Step4. Run Evaluation For our end

-to-end evaluation, we employed a LLM-based assessment: 📝 Citation

Frequently asked questions

How many stars and forks are recorded?

Alibaba-NLP/ViDoRAG has 670 stars and 51 forks.

What is the repository rank?

Alibaba-NLP/ViDoRAG is ranked 15,219.

What language and category are recorded?

Alibaba-NLP/ViDoRAG has 670 stars, uses Python and belongs to AI Engineering.

Which repository is closest in rank?

Alibaba-NLP/ViDoRAG is compared with zinja-coder/apktool-mcp-server, ranked 15,218 with 671 stars.

README

ViDoRAG: Visual Document Retrieval-Augmented Generation via Dynamic Iterative Reasoning Agents

🔥 News

  • 🎉 We have released the evaluation code, allowing you to customize your own evaluation pipeline.
  • 🎉 Our framework integrates various embedding models, enabling you to create your own retriever.
  • 🎉 We have released the ViDoSeek dataset, which is suitable for Retrieval-augmented Generation in the large visually rich document collection.

🚀Overview

  • We introduce ViDoSeek, a benchmark specifically designed for visually rich document retrieval-reason-answer, fully suited for evaluation of RAG within large document corpus.
  • We propose ViDoRAG, a novel RAG framework that utilizes a multi-agent, actor-critic paradigm for iterative reasoning, enhancing the noise robustness of generation models.
  • We introduce a GMM-based multi-modal hybrid retrieval strategy to effectively integrate visual and textual pipelines.
  • Extensive experiments demonstrate the effectiveness of our method. ViDoRAG significantly outperforms strong baselines, achieving over 10% improvement, thus establishing a new state-of-the-art on ViDoSeek.

🔍ViDoSeek Dataset

We release our ViDoSeek dataset which designed for visually rich document retrieval-reason-answer. In ViDoSeek, each query has a unique answer and specific reference pages.

The provided JSON structure includes a unique identifier (uid) to distinguish queries, the query content (query), a reference answer (reference_answer), and metadata (meta_info) containing the original file name (file_name), reference page numbers (reference_page), data source type (source_type), and query type (query_type):

{
    "uid": "04d8bb0db929110f204723c56e5386c1d8d21587_2",
    "query": "What is the temperature of Steam explosion of Pretreatment for Switchgrass and Sugarcane bagasse preparation?", 
    "reference_answer": "195-205 Centigrade", 
    "meta_info": {
        "file_name": "Pretreatment_of_Switchgrass.pdf", 
        "reference_page": [10, 11], 
        "source_type": "Text", 
        "query_type": "Multi-Hop" 
    }
}

You can use Git LFS to download annotation files and original documents from Hugging Face or ModelScope. The format of the files can refer to ./data/ExampleDataset.

Download the dataset

bash scripts/ViDoSeek_down.sh

Then, you can use the following script to convert the original file into images:

python ./scripts/pdf2images.py

Optionally, you can use OCR models or Vision-Language Models (VLMs) to recognize text within images:

## triditional OCR models
python ./scripts/ocr_triditional.py 
## VLMs as ocr models (Optional)
python ./scripts/ocr_vlms.py 

💻 Running ViDoRAG

ViDoRAG is a novel multi-agent RAG framework tailored for complex reasoning across visual documents. ViDoRAG employs a Gaussian Mixture Model (GMM)-based hybrid strategy to effectively handle multi-modal retrieval.

Dependencies

# Create environment
conda create -n vidorag python=3.10
# Clone project
git clone https://github.com/alibaba-nlp/ViDoRAG.git
cd ViDoRAG
# Install requirements
pip install -r requirements.txt

Or you can use uv to install the dependencies:

pip install uv
uv venv -p 3.10
uv sync

We recommend following the guidance of the Colpali-engine and the Transformer library to install the most suitable version.

Below is a step-by-step guide to help you run the entire framework on your own dataset. You can also use individual modules independently:

Step1. Build the Index Database

Our framework is built on the foundation of the Llama-Index. We preprocess the corpus in advance and then establish an index database.

Before embedding the whole dataset, you can run ./llms/vl_embedding.py to check whether the embedding model is loaded correctly:

python ./llms/vl_embedding.py

Then, you can run ingestion.py to embedding the whole dataset:

# Document ingestion and Multi-Modal Embedding
python ./ingestion.py

Step2. Run Multi-Modal Retriever

Try using the basic single-modal search engine:

from search_engine import SearchEngine
# initial engine
search_engine = SearchEngine(dataset='ViDoSeek', node_dir_prefix='colqwen_ingestion',embed_model_name='vidore/colqwen2-v1.0')
# Retrieve some results
recall_results = search_engine.search('some query')

Try using the dynamic single-modal search engine with GMM:

from search_engine import SearchEngine
# initial engine
search_engine = SearchEngine(dataset='ViDoSeek', node_dir_prefix='colqwen_ingestion',embed_model_name='vidore/colqwen2-v1.0')
# Set parameters of dynamic retriever
search_engine.gmm = True
search_engine.input_gmm = 20 # The default setting is K
# Retrieve some results using dynamic recall
recall_results = search_engine.search('some query')

Try using the dynamic hybrid multi-modal search engine:

from search_engine import HybridSearchEngine
# initial engine
hybrid_search_engine = HybridSearchEngine(dataset='ViDoSeek', embed_model_name_vl='vidore/colqwen2-v0.1', embed_model_name_text='BAAI/bge-m3', gmm=True)
# Retrieve some results using dynamic recall
hybrid_recall_results = hybrid_search_engine.search('some query')

Optionally, you can choose to test these features in search_engine.py.

Step3. Run Multi-Agent Generation

You can directly use our script for generation in vidorag_agents.py, or you can integrate it into your own framework:

from llms.llm import LLM
vlm = LLM('qwen-vl-max')
agent = ViDoRAG_Agents(vlm)
answer=agent.run_agent(query='Who is Tim?', images_path=['./data/ExampleDataset/img/00a76e3a9a36255616e2dc14a6eb5dde598b321f_1.jpg','./data/ExampleDataset/img/00a76e3a9a36255616e2dc14a6eb5dde598b321f_2.jpg'])
print(answer)

Step4. Run Evaluation

For our end-to-end evaluation, we employed a LLM-based assessment:

python eval.py \
  --experiment_type retrieval_infer ## choose from retrieval_infer/dynamic_hybird_retrieval_infer/vidorag
  --dataset ViDoSeek ## dataset folder name 
  --embed_model_name_vl ## vl embedding model name
  --embed_model_name_text ## text embedding model name
  --embed_model_name ## only for single embedding model eval, when you need not use vl or text above
  --generate_vlm ## VLMs name eg. gpt-4o/qwen-max-vl

📝 Citation

@article{wang2025vidorag,
  title={ViDoRAG: Visual Document Retrieval-Augmented Generation via Dynamic Iterative Reasoning Agents},
  author={Wang, Qiuchen and Ding, Ruixue and Chen, Zehui and Wu, Weiqi and Wang, Shihang and Xie, Pengjun and Zhao, Feng},
  journal={arXiv preprint arXiv:2502.18017},
  year={2025}
}
Nearby in the ranking
Similar items