DocsQuick StartAI News
AI NewsTongyi Open Source VimRAG: One Framework to Handle Text, Images, and Videos
New Model

Tongyi Open Source VimRAG: One Framework to Handle Text, Images, and Videos

2026-04-10
Tongyi Open Source VimRAG: One Framework to Handle Text, Images, and Videos

Tongyi Lab has open-sourced the multimodal RAG framework **VimRAG**, which for the first time unifies retrieval-augmented generation across three modalities—text, images, and video—within a single architecture. Alongside it, the **Qwen2.5-VL-7B-VRAG** model has been released, directly addressing real pain points in enterprise hybrid knowledge bases.

In the past few days, Tongyi Lab has made a big move — open-sourcing VimRAG, a unified RAG framework that can handle text, images, and videos simultaneously, along with the accompanying Qwen2.5-VL-7B-VRAG model, which has also been released on ModelScope.

This isn’t just another “multimodal” gimmick. It targets a long-standing but unsolved problem in the industry: when your knowledge base contains not just documents, but also images and videos — how should RAG handle that?

First, identify where the problem lies

Everyone’s familiar with the RAG approach. You chunk up an enterprise knowledge base, vectorize it, retrieve relevant content, and feed it into a large model so the AI’s answers are grounded. In 2024 alone, nearly every company working on AI applications has built some version of this.

But what does a real-world knowledge base look like?

Take a manufacturing company as an example: within 100,000 PDF technical documents are countless charts; there are 50,000 CAD design drawings and production line photos; and over a thousand training videos, each 30 to 60 minutes long. If someone asks: “What changes were made in the product design in Q3 last year, and how were they discussed in the meeting recordings?” — that question spans three modalities. The answer might be scattered across paragraphs in a PDF, annotation layers in a CAD drawing, and a specific minute of dialogue in a video.

Traditional RAG setups in such scenarios are essentially patchwork: one pipeline for text, another for images — and videos? Most approaches just ignore them or extract only coarse-grained keyframes. Each pipeline runs independently, and the cross-modal relationships are lost.

That’s exactly what VimRAG aims to solve.

VimRAG architecture overview: unified retrieval and generation across text, image, and video

The core idea of VimRAG

In short: unify text, image, and video under a single retrieval-generation framework — one model, one workflow.

Easier said than done. Why is it hard? Because the information density and structure vary drastically among these three modalities. A short text might be fully represented with a few hundred tokens; an image contains far richer information per unit length; and a 60-minute video expands the information exponentially, adding a temporal structure. Aligning all of them in the same retrieval space is inherently difficult.

Based on available information and Tongyi Lab’s prior work, VimRAG’s technical route can be broken into several key components:

Unified multimodal representation

Unlike the traditional approach of building separate indexes for each modality and merging later, VimRAG tries to align all three modalities at the representation level into a shared semantic space. This relies on the Qwen2.5-VL model series’ strong visual-language alignment. The 7B-parameter VRAG version maintains inference efficiency while being specifically optimized for finer-grained visual understanding.

Video processing strategy

Video is the trickiest modality. You can’t encode every frame of a 30-minute training video into the retrieval database — the storage and compute costs would be prohibitive. VimRAG’s approach applies multi-level semantic segmentation: first cutting videos into segments based on scenes and semantic boundaries, then extracting keyframes and corresponding speech/subtitle text for each segment, forming a composite “visual + text” embedding. During retrieval, it locates the relevant segment; during generation, it refers back to the precise timestamp.

This approach is an extension of Tongyi’s previous ViDoRAG framework (a multi-agent RAG for visual documents). ViDoRAG handled document-image retrieval with collaborative agents and iterative reasoning for chart-dense PDFs. VimRAG naturally extends that idea — from “visual documents” to “visual documents + video.”

Cross-modal relational reasoning

Once the relevant text passages, images, and video clips are retrieved, a key challenge remains: how can the model understand their relationships?

For instance, a PDF might say “See Figure 3-7 for the stress test results of design plan B.” The figure is a CAD screenshot, while the detailed test discussion exists in a specific part of a meeting video. The model must connect all three to form a complete answer.

That’s exactly what the VimRAG framework aims to solve. Rather than merging three separate retrieval outputs, it enables the model to “see” all multimodal context simultaneously during generation, leveraging Qwen2.5-VL’s long-context reasoning for joint inference.

VimRAG’s position among similar solutions

The multimodal RAG space has indeed become lively recently. Just a short while ago, HKU released RAG-Anything, which focuses on creating unified multimodal knowledge graphs capable of handling text, charts, tables, formulas, and more.

But RAG-Anything and VimRAG differ in focus. RAG-Anything emphasizes parsing multimodal elements within documents — extracting structured representations to build a knowledge graph. Its strength lies in document-level semantic depth.

VimRAG’s ambition is broader: it covers “documents + standalone images + videos” in hybrid knowledge bases. Rather than being competitors, the two frameworks address different layers of the multimodal RAG problem space.

Looking at Tongyi’s own line of progression:

  • VRAG-RL – Visual-perception RAG with reinforcement-learning-optimized retrieval
  • ViDoRAG – Multi-agent RAG for visual documents
  • VimRAG – Unified framework for text, image, and video

This shows a systematic layout for multimodal RAG, expanding modality coverage and scenario complexity step by step. VimRAG is currently the most complete implementation in that lineage.

The accompanying model: Qwen2.5-VL-7B-VRAG

Alongside the framework, Tongyi has released the Qwen2.5-VL-7B-VRAG model on ModelScope.

The 7B parameter scale is worth noting: it means the model can run on a single consumer GPU (like an RTX 4090), without requiring multi-GPU clusters. For teams wanting to deploy multimodal RAG privately within enterprises, this is a friendly threshold.

However, some concerns have surfaced in community discussions. Developers noted that while official materials mention CAD design drawing recognition, the ModelScope page doesn’t clearly specify its level of CAD format support. Tongyi will need to clarify this, as recognizing CAD drawings differs significantly from standard photos or screenshots — it involves specialized annotation systems, layer structures, and dimensional labels.

Practical integration: how to use it

For developers, VimRAG is based on the Qwen2.5-VL model series and is compatible with the OpenAI API format. If you’re already using OpenAI-compatible APIs, integration is simple.

For example, calling Qwen models for multimodal Q&A via OpenAI Hub would look like this:

from openai import OpenAI
import base64

client = OpenAI(
    api_key="Your OpenAI Hub API Key",
    base_url="https://api.openai-hub.com/v1"
)

# Read a local image and encode it
with open("design_diagram.png", "rb") as f:
    image_data = base64.b64encode(f.read()).decode("utf-8")

response = client.chat.completions.create(
    model="qwen-vl-max",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Compared with the previous review version, what are the main changes in this design drawing?"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": f"data:image/png;base64,{image_data}"
                    }
                }
            ]
        }
    ]
)

print(response.choices[0].message.content)

Of course, as a complete RAG framework, VimRAG’s real value isn’t in single API calls, but in its full retrieval-generation pipeline. You’ll need to integrate your hybrid knowledge base, build indexes, configure retrieval, and fine-tune generation strategies. That’s a fair amount of work — but now there’s an open-source foundation to build on.

A few sobering points

Open-sourcing is great, but don’t rush it into production. Some things to pay attention to:

  1. Video processing quality and efficiency. The quality of video semantic segmentation directly affects retrieval accuracy. Too coarse, and key info gets lost; too fine, and noise overwhelms. The right balance varies by scenario and needs real-world validation.
  2. 7B model capacity limits. Multimodal understanding itself demands high model capability; combining that with long-context reasoning in RAG pushes the limits of a 7B model. More community testing is needed here. The good news: larger Qwen2.5-VL variants are available as drop-in replacements.
  3. Engineering complexity. Preprocessing a hybrid knowledge base is itself a large undertaking — video transcoding, audio extraction, OCR, image classification, etc. The framework doesn’t automate these.
  4. CAD and other specialized formats. The community’s already asking, but official clarification is pending. If your use case relies heavily on engineering drawings, you might want to wait for concrete results.

In conclusion

Multimodal RAG has become one of the most important evolutionary directions in AI applications since 2025. From pure-text RAG to image-text RAG and now to RAG with video, the scope of knowledge bases keeps expanding. VimRAG’s open-sourcing gives developers the first truly unified framework covering three major modalities.

It’s not perfect — there’s still plenty of engineering polish needed — but it’s heading in the right direction. As enterprise knowledge assets increasingly take the form of video and images rather than text, a unified multimodal RAG solution becomes not just a nice-to-have, but a necessity.

Tongyi Lab’s consistent investment in this direction — from VRAG-RL to ViDoRAG to VimRAG — shows a clear technical roadmap. Now it’s up to the community to see how far they can take it.


References:

Related Articles

View All

Contact Us

We usually reply quickly during business hours

Scan WeChat

Support: Hub Assistant

WeChat ID: