AI-Powered Chatbots for Education Using RAGs
Abstract
This study examines the use of Retrieval-Augmented Generation (RAG) in AI-powered educational chatbots, focusing on embedding efficiency, large language model (LLM) performance, and context integrity. Implemented within the MOOC Informatik-Fit at TU Graz, the system supports scalable, curriculum-aligned self-paced learning. Three embedding models were evaluated, with text-embedding-ada-002 offering the best balance between semantic quality and cost-efficiency. Subsequently, three LLMs—GPT-3.5 Turbo, GPT-4o, and GPT-4o mini—were compared, revealing GPT-4o mini as the most cost-effective option while maintaining high accuracy and contextual coherence. Ethical robustness was assessed using 30 adversarial prompts, demonstrating strong resistance to jailbreaking in both GPT-4o and GPT-4o mini, supporting their suitability for secure and pedagogically reliable MOOC applications. The paper also presents a replicable framework for the implementation of RAG-based systems, with the objective of promoting personalized, ethical, and accessible digital education on a large scale.
Fields of Study & Subjects
Artificial Intelligence in Education
Intelligent Tutoring Systems and Adaptive Learning
Artificial Intelligence in Healthcare and Education
Publication details
- Journal / source
- Chapman & Hall/CRC eBooks
- Pages
- 121–141
- Publication date
- 23 February 2026
- Language
- EN
- Document type
- Book chapter