Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ColPali RAG Visual Expert

ColPali RAG Visual Expert is a Vision-RAG (Retrieval-Augmented Generation) application built to help users interact with complex PDF documents. Instead of relying only on text extraction, it uses visual retrieval so the system can understand charts, tables, and layouts as they appear on the page.

Source Research Paper - ColPali

Overview

Traditional RAG pipelines often depend on OCR and plain text extraction, which can miss layout and visual context. ColPali is designed for document retrieval from visual page features, while Qwen2-VL can analyze retrieved page content as a vision-language model.

This project combines those ideas in a Streamlit interface so users can upload a PDF, index its pages visually, and ask questions grounded in the most relevant page.

Features

  • Visual retrieval with ColPali: Indexes PDF pages as visual representations instead of depending only on extracted text.
  • Vision-based answer generation with Qwen2-VL: Analyzes the retrieved page, including tables, diagrams, and layout-aware content.
  • Interactive Streamlit UI: Provides a simple app interface for document upload, indexing, querying, and source preview.
  • Better handling of visually rich PDFs: Useful for reports, scanned documents, charts, and presentation-style PDFs where layout matters.

Installation

Clone the repository and install the required dependencies:

git clone https://github.com/pranjalparmar/ColPali-Vision-RAG.git
pip install -r requirements.txt

Usage

Start the Streamlit app with:

streamlit run main.py

streamlit run is the standard command Streamlit uses to launch an app from a Python script. [web:7]

Then follow these steps:

  1. Upload a PDF in the Document Library.
  2. Click Load & Index to generate visual embeddings.
  3. Ask a question in the chat input.
  4. Review the retrieved source page shown by the app.

Screenshots

Sidebar & Document Indexing

Sidebar and document indexing

Visual Query & Response

Visual query and response Visual query and response

Tech Stack

About

ColPali RAG Visual Expert is a Vision-RAG (Retrieval-Augmented Generation) application built to help users interact with complex PDF documents. Instead of relying only on text extraction, it uses visual retrieval so the system can understand charts, tables, and layouts as they appear on the page.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages