A Customized RAG-Based Chatbot for iCorsi

Master Thesis

Author: Gianluca Maragliano

Academic Year: 2025/2026

Defense Date: 18 June 2026

Institution: UniversitĂ  della Svizzera italiana

Faculty: Faculty of Informatics

Program: Master of Science in Software & Data Engineering

Abstract

Students increasingly turn to general purpose Artificial Intelligence (AI) assistants for various kinds of help with coursework, from clarifying lecture concepts to working through assignments. These tools can produce relevant answers and are always available, but they have no awareness of what a particular instructor taught, what notation the course uses, or what was shown during a specific lecture. The materials students are actually supposed to learn from sit on their university’s learning platform, entirely out of reach from the AI assistants. Grounding these assistants in course content is the obvious remedy. This thesis pursues that goal in the context of iCorsi, the Learning Management System at Università della Svizzera italiana (USI), a setting that surfaces two main engineering and conceptual challenges.

The first is synchronisation. Ethel, an open-source Retrieval-Augmented Generation-based educational assistant developed at ETH Zurich, provides a capable retrieval pipeline for course materials, but in its baseline form it has no connection to iCorsi. Materials must be uploaded manually to a separate system, and any update an instructor makes on the platform leaves the knowledge base stale until someone intervenes. The second problem concerns lecture recordings, one of the most substantial sources of educational content on iCorsi. Recordings cannot simply be transcribed: when a lecturer says this dependency while pointing at a diagram, the reference is meaningful only to a student who can see the screen; in a plain transcript, the word has no referent.

This thesis addresses both problems through two contributions. The first integrates Ethel directly into iCorsi through a plugin that surfaces the chat interface within course pages, a webhook listener that triggers ingestion automatically on any content change, and an idempotent pipeline that keeps the knowledge base aligned with the live course state. The second is a multimodal video pipeline that identifies scene transitions in the screen recording, transcribes the audio, aligns the two sources temporally, extracts slide text via Docling, and fuses transcript and visual content into a single coherent retrieval chunk using a Large Language Model. The assistant therefore has access to both what was said and what was shown on screen.

Both contributions are evaluated at three levels. First, a human study rates unified chunk quality at a mean of 4.64/5 across four dimensions. Second, an automated evaluation on 374 synthetic query–answer pairs yields Recall@5 of 98.40% on the full corpus and mean Faithfulness above 0.92. Finally, an end-to-end evaluation on 28 questions drawn from two real course exams yields an Answer Accuracy of 0.720. The evaluation provides preliminary evidence that the system is valuable as a study aid, while multi-concept reasoning over retrieved content remains the primary open challenge. The system has been deployed and made available to students enrolled in a USI course to prepare for the final exam.