Research Article Open Access

Integration of Local Large Language Models, Retrieval-Augmented Generation, and Adaptive Learning

Anass Belcaid1 and Kamal Reklaoui1
  • 1 Department of Artificial Intelligence and Digitalisation, National School Applied Sciences, Tetouan, Morocco

Abstract

In recent years, many schools and teachers have started using closed Large Language Models (LLMs) to help with learning. These tools can be very helpful for tutoring and personal learning, but they also bring serious problems. One big issue is that they use cloud systems, which means student data is sent to outside servers. This can put privacy at risk and takes away control from students and teachers over how data is used. Also, closed LLMs often use the same method for every student. They don’t adapt to different learning styles, speeds, or needs. Because of this, many students may feel left out or unsupported especially those who need extra help or a more personal approach. In this paper, we present a novel solution that addresses these challenges by combining a local LLM with Retrieval-Augmented Generation (RAG) and adaptive learning. Our system runs entirely on the user's device, ensuring that all student data remains private and under local control eliminating reliance on external servers. RAG enhances response accuracy by retrieving relevant educational content, enabling clear explanations and context-aware questioning. To personalize learning, the system dynamically adjusts content difficulty and style based on real-time student performance, tracked using Bayesian Knowledge Tracing (BKT). We implemented our approach as a Moodle plugin, integrating it seamlessly into online learning platforms such as MOOCs. Results from a pilot study show that our system increases student success rates by +15 (from 65 to 80%), reduces response time by 20, and boosts daily student interactions by 60%. Qualitative feedback also indicates high student satisfaction and positive instructor evaluations. These improvements reflect not only technical performance but also a deeper commitment to aligning AI with the core values of education privacy, equity, and learner agency. By grounding AI support in local control and adaptive personalization, we aim to build a fairer, flexible, and trustworthy approach to educational technology, where innovation serves both pedagogical effectiveness and human dignity.

Journal of Computer Science
Volume 22 No. 4, 2026, 1145-1157

DOI: https://doi.org/10.3844/jcssp.2026.1145.1157

Submitted On: 21 May 2025 Published On: 26 March 2026

How to Cite: Belcaid, A. & Reklaoui, K. (2026). Integration of Local Large Language Models, Retrieval-Augmented Generation, and Adaptive Learning. Journal of Computer Science, 22(4), 1145-1157. https://doi.org/10.3844/jcssp.2026.1145.1157

  • 76 Views
  • 16 Downloads
  • 0 Citations

Download

Keywords

  • Artificial Intelligence
  • Local LLMs
  • RAG
  • Adaptive Learning
  • Moodle
  • Data Privacy