This project implements a Multimodal Retrieval-Augmented Generation (RAG) pipeline designed to revolutionize educational practices by promoting self-directed learning. The system functions as an "experienced virtual secondary teacher" that provides step-by-step guidance toward solutions, specifically avoiding "spoon-fed" answers to foster critical thinking. The RAG system is grounded in rigorous academic material, utilizing questions from VWO exam papers (Dutch pre-university final examinations) to ensure the generated guidance is accurate and appropriately challenging.
- Multimodal Retrieval: Processes and retrieves both text and image data from complex source documents (PDFs).
- Pedagogical Constraint: Enforces a strict output format that prioritizes guidance over direct answers, ensuring the model's response structure is:
- Detailed Image Descriptions.
- Key Text Explanations.
- Step-by-Step Guidance (Crucially, no final answer provided).
- Hallucination Reduction: The RAG approach enhances the LLM's grounding with precise, context-specific information, significantly reducing the risk of generating inaccurate or fabricated content.
- Knowledge Scoping: The model's knowledge is intentionally scoped to the provided documents, ensuring responses are relevant and tailored to the secondary school academic level.
| Component | Technology/Library | Function |
|---|---|---|
| Framework | LangChain | Used to build and connect the modular RAG pipeline components efficiently. |
| LLM | GPT-4o (Multimodal) | Generates guided, context-aware responses based on augmented text and image inputs. |
| Embedding Model | CLIP Model | Converts text queries, document text, and images into unified numerical vectors. |
| Vector Store | FAISS | Indexes and stores embedding vectors for high-efficiency similarity search. |
| Data Format | Base64 | Used for serialization and storage of image data before LLM input. |
This can be readily turned into a python file and this RAG pipeline can be integrated into a chatbot interface.
Lee Pei Xin