Skip to content

Repository files navigation

Multimodal Structure-Aware Educational RAG

Python Streamlit License

A lightweight, GPU-free Retrieval-Augmented Generation (RAG) system for educational textbooks. It combines hierarchical chunking, metadata-enhanced sparse retrieval, and multimodal visualization for efficient, interpretable information retrieval.


Features

  • Structure-Aware Chunking: Preserves textbook hierarchy during content chunking.
  • Metadata-Enriched Sparse Retrieval: Uses enhanced TF-IDF indexing for accurate search.
  • Educational Query Reranking: Optimized for terminology, definitions, and contextual queries.
  • Multimodal Results: Displays both text and relevant image-based retrieval results.
  • Interactive UI: Clean, responsive interface built with Streamlit.
  • Lightweight & Efficient: No vector database required, no external API dependencies, and fully explainable retrieval process.

Pipeline Overview

  1. PDF Content Extraction: Extracts text and visual elements from educational materials.
  2. Hierarchical Subtopic Chunking: Chunks text while respecting the document's logical structure.
  3. Sparse TF-IDF Indexing: Computationally efficient indexing.
  4. Metadata-Aware Retrieval & Reranking: Advanced matching logic.
  5. Multimodal Visualization: Presenting contextually rich results.

Performance & Results

Our ablation studies and retrieval performance metrics demonstrate high accuracy across various educational query types:

Query Type Top-3 Accuracy
Terminology Queries 96%
Definition Queries 92%
Section-Aware Queries 95%
Long Educational Queries 88%
Conceptual Paraphrase Queries 71%
Retrieval Performance Ablation Study

Application Screenshots

Result Example 1 Result Example 2

Technology Stack

  • Python
  • Scikit-Learn
  • Streamlit
  • NumPy & Pandas
  • PDF Processing Libraries

Getting Started

Prerequisites

Make sure you have Python 3.8+ installed.

Installation

  1. Clone the repository:
    git clone <your-repo-url>
    cd Multimodal-Structure-Aware-Educational-RAG
  2. Install dependencies:
    pip install -r requirements.txt

Running the Application

To start the interactive Streamlit interface:

streamlit run streamlit_app.py

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.


Made with by Nandeesh IB & Team

About

A lightweight, multimodal RAG system for educational textbooks. Achieves high-accuracy information retrieval without the need for GPUs or external vector databases.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages