Skip to main content

🪄🎓 VideoRAC: Retrieval-Adaptive Chunking for Lecture Video RAG

VideoRAC Logo

🏛️ Official CSICC 2025 Implementation

"Adaptive Chunking for VideoRAG Pipelines with a Newly Gathered Bilingual Educational Dataset"

(Presented at the 30th International Computer Society of Iran Computer Conference — CSICC 2025)

Paper Dataset Python License: CC BY 4.0


📊 Project Pipeline

VideoRAC Pipeline

📖 Overview

VideoRAC (Video Retrieval-Adaptive Chunking) provides a comprehensive framework for multimodal retrieval-augmented generation (RAG) in educational videos. This toolkit integrates visual-semantic chunking, entropy-based keyframe selection, and LLM-driven question generation to enable effective multimodal retrieval.

This repository is the official implementation of the CSICC 2025 paper by Hemmat et al.

Hemmat, A., Vadaei, K., Shirian, M., Heydari, M.H., Fatemi, A. “Adaptive Chunking for VideoRAG Pipelines with a Newly Gathered Bilingual Educational Dataset.” Proceedings of the 30th International Computer Society of Iran Computer Conference (CSICC 2025), University of Isfahan.


🧠 Research Background

This framework underpins the EduViQA bilingual dataset, designed for evaluating lecture-based RAG systems in both Persian and English. The dataset and code form a unified ecosystem for multimodal question generation and retrieval evaluation.

Key Contributions:

  • 🎥 Adaptive Hybrid Chunking — Combines CLIP cosine similarity with SSIM-based visual comparison.
  • 🧮 Entropy-Based Keyframe Selection — Extracts high-information frames for retrieval.
  • 🗣️ Transcript–Frame Alignment — Synchronizes ASR transcripts with visual semantics.
  • 🔍 Multimodal Retrieval — Integrates visual and textual embeddings for RAG.
  • 🧠 Benchmark Dataset — 20 bilingual educational videos with 50 QA pairs each.

⚙️ Installation

pip install VideoRAC

🚀 Usage Example

1️⃣ Hybrid Chunking

from VideoRAC.Modules import HybridChunker

chunker = HybridChunker(
    clip_model='openai/clip-vit-base-patch32',
    alpha=0.6,
    threshold_embedding=0.85,
    threshold_ssim: float=0.8,
    interval: int=1,
)
chunks, timestamps, duration = chunker.chunk("lecture.mp4")
chunker.evaluate()

2️⃣ Q&A Generation

from VideoRAC.Modules import VideoQAGenerator

def my_llm_fn(messages):
    from openai import OpenAI
    client = OpenAI()
    response = client.chat.completions.create(model="gpt-4o", messages=messages)
    return response.choices[0].message.content

urls = ["https://www.youtube.com/watch?v=2uYu8nMR5O4"]
qa = VideoQAGenerator(video_urls=urls, llm_fn=my_llm_fn)
qa.process_videos()

📈 Results Summary (CSICC 2025)

Method AR CR F Notes
VideoRAC (CLIP+SSIM) 0.87 0.82 0.91 Best performance overall
CLIP-only 0.80 0.75 0.83 Weaker temporal segmentation
Simple Slicing 0.72 0.67 0.76 Time-based only

Evaluated using RAGAS metrics: Answer Relevance (AR), Context Relevance (CR), and Faithfulness (F).


🧾 License

Licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

You may share and adapt this work with attribution. Please cite our paper when using VideoRAC or EduViQA:

@INPROCEEDINGS{10967455,
  author={Hemmat, Arshia and Vadaei, Kianoosh and Shirian, Melika and Heydari, Mohammad Hassan and Fatemi, Afsaneh},
  booktitle={2025 29th International Computer Conference, Computer Society of Iran (CSICC)}, 
  title={Adaptive Chunking for VideoRAG Pipelines with a Newly Gathered Bilingual Educational Dataset}, 
  year={2025},
  volume={},
  number={},
  pages={1-7},
  keywords={Measurement;Visualization;Large language models;Pipelines;Retrieval augmented generation;Education;Question answering (information retrieval);Multilingual;Standards;Context modeling;Video QA;Datasets Preparation;Academic Question Answering;Multilingual},
  doi={10.1109/CSICC65765.2025.10967455}}

👥 Authors

University of Isfahan — Department of Computer Engineering


⭐ Official CSICC 2025 Implementation — Give it a star if you use it in your research! ⭐ Made with ❤️ at University of Isfahan

Metadata

Release files for VideoRAC 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for VideoRAC 0.2.7
File Size Uploaded
videorac-0.2.7.tar.gz 20.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for VideoRAC 0.2.7
File Interpreter ABI Platform
videorac-0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 38.6 kB

Release files / videorac-0.2.7.tar.gz

Download URL videorac-0.2.7.tar.gz
Size 20.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6dce66a9bae051bb769c098f8af9e5be189f3f60539c31ae8e8c0a29f8774f90
BLAKE2b-256 checksum
How to use checksums
7aa092c0f743bb3b3a460a194997f4ad9d046813b0fb91bba44f3c961d308553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release files / videorac-0.2.7-py3-none-any.whl

Download URL videorac-0.2.7-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef2b8ac28bdcea5e59f7e23807362349d6e0461d4d6ebcf856bdc551c0b7174c
BLAKE2b-256 checksum
How to use checksums
d49c8b151cf79c997097b1d27204976b5f3e539a1fc3f186333fefe1394aa177
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page