From Slides to Chatbots: Enhancing Large Language Models with University Course Materials

Tu Anh Dinh, Philipp Nicolas Schumacher, Jan Niehues · DOI

Introduction

Large Language Models (LLMs) have demonstrated remarkable general-purpose reasoning capabilities. However, they often struggle with the "last mile" of specialized academic knowledge. While a model might understand the broad strokes of computer science, it frequently fails to answer specific exam questions that rely on the unique pedagogical approach, specific diagrams, or niche explanations provided by a particular professor. Researchers at the Karlsruhe Institute of Technology (KIT) recently investigated how to bridge this gap, comparing two primary technical strategies: Retrieval-Augmented Generation (RAG) and Continual Pre-Training (CPT).

The Challenge of Academic Data

University course materials present a unique challenge for AI. Lecture slides are visually dense, relying on spatial layouts, complex formulas, and diagrams to convey meaning. Conversely, lecture transcripts are often "messy," containing the unstructured, repetitive, and filler-heavy nature of spoken language. Simply extracting text from these sources often results in a loss of critical context. This study sought to determine whether it is better to bake this specialized knowledge into a model's weights through training or to provide it as external context during inference.

Methodology

Retrieval-Augmented Generation (RAG)

The researchers implemented a RAG system using the M3-Embedding model to index course materials. They explored two variations of this approach:

  1. Text-based RAG: The system retrieves text chunks from slides or transcripts and provides them to the LLM.
  2. Multi-modal RAG: This approach uses text for retrieval but provides the actual image of the lecture slide to a vision-capable model (like Qwen2-VL). This preserves the visual relationships—such as arrows in a flowchart or the positioning of variables in a formula—that text extraction typically destroys.
Comparison of Text-based RAG (left) and Multi-modal RAG (right) architectures.

Continual Pre-Training (CPT)

As an alternative to RAG, the team tested further training a base LLM (LLaMA 3.1 8B) on the course materials. To combat "catastrophic forgetting"—where a model learns new facts but loses its ability to follow instructions—they employed a technique called Instruction Residuals. This method calculates the weight difference between a base model and its instruction-tuned counterpart, adding these "residuals" back into the model after it has been trained on the specialized course data.

The Continual Pre-Training (CPT) pipeline utilizing Instruction Residuals to preserve instruction-following capabilities.

Experimental Setup and Benchmarking

To evaluate these methods, the researchers developed the SciEx Benchmark, consisting of 154 unique questions from 10 real university exams. These covered six core topics: Algorithms, Databases, Deep Learning, Human-Computer Interaction (HCI), Natural Language Processing (NLP), and Theoretical Foundations of CS. The training data included 3.9K lecture slides and 3.3M tokens of polished lecture transcripts.

Key Insights

Visual Context is Essential

The multi-modal RAG approach emerged as the superior strategy. By allowing the LLM to "see" the slides, the model could interpret structural and temporal relationships that were lost in text-only versions. This was particularly evident in topics like HCI, where visual layouts are central to the curriculum.

The Noise of Transcripts

Surprisingly, the inclusion of lecture transcripts often hindered performance. The verbosity and "filler" content in spoken language appeared to distract the models from the core technical facts found in the more concise, structured slides.

RAG Outperforms CPT on Small Datasets

Continual Pre-Training proved difficult to execute effectively with the relatively small volume of data provided by a single university course. The models struggled to integrate the new knowledge without degrading their general reasoning. RAG, by contrast, was more robust, easier to implement, and significantly more effective at answering "hard" difficulty questions, where it provided a +10.79% performance boost.

Results and Conclusion

Overall, RAG improved exam scores across all tested models. For instance, Qwen2-VL's score increased from 38.05 to 42.50 (on a 60-point scale) when utilizing multi-modal RAG. In specialized subjects like HCI, the gains were even more pronounced, with a +6.11 point improvement over the baseline.

The study concludes that for specialized, visually-rich academic domains, providing models with visual context via multi-modal RAG is currently the most effective way to enhance performance. Future work may explore hybrid systems that combine the conciseness of slides with the deep explanatory power of transcripts, or investigate how these findings scale to non-technical fields like Law or History.

Summary updated

BibTeX
@inproceedings{dinh2026from,
  author = {Tu Anh Dinh and Philipp Nicolas Schumacher and Jan Niehues},
  title = {{From Slides to Chatbots: Enhancing Large Language Models with University Course Materials}},
  booktitle = {NSLP@LREC},
  year = {2026},
  doi = {10.63317/5bjdtya4ui69},
}
Figure