JELAI: Smarter AI Tutoring in Jupyter Notebooks

Generative AI can offer instant help, but often lacks the context of a student's learning journey. JELAI is an open-source platform that integrates AI tutoring directly into Jupyter Notebooks, enriched with real-time Learning Analytics to provide pedagogically-aware support and a powerful research tool.

What is JELAI?

JELAI (Jupyter Environment for Learning Analytics and AI) is an experimental architecture designed to bridge the gap between powerful Large Language Models (LLMs) and the nuanced needs of education. It transforms the standard Jupyter environment into a smart, responsive learning tool. By capturing fine-grained student interactions—like code edits, executions, and errors—alongside their chat conversations with an AI tutor, JELAI provides the AI with the critical context it needs. This allows the AI to offer adaptive, pedagogically-sound scaffolding instead of just generic answers, while also creating a rich, integrated dataset for researchers to study student learning behaviors with AI.

The JELAI Architecture

JELAI uses a modular, containerized design to ensure scalability, privacy, and extensibility. Click through the steps below to see how data flows from the user to the AI and back, creating a context-aware feedback loop.

Host Machine

JupyterHub Container

Manages users and spawns individual notebook containers.

User Notebook Container

The student's live Jupyter environment with chat and telemetry extensions.

Middleware Container

Processes logs, applies pedagogical rules, and enriches AI prompts.

LLM Server

Hosts local models (e.g., Llama, Gemma) via Ollama for privacy and control.

JELAI in Action: Proof-of-Concept Use Cases

To demonstrate its capabilities, JELAI was used in two small-scale pilot studies. These examples showcase how the platform can be used for both observational research and experimental A/B testing. Click each card to see the results.

Discussion and Future Work

JELAI provides a novel, open-source framework for integrating Learning Analytics with AI tutoring in Jupyter Notebooks, enabling context-aware support and valuable research opportunities. While current limitations include the computational cost of local LLMs and configuration complexity, future work will focus on enhancing AI proactivity, simplifying setup with templates, and improving interoperability with standards like xAPI. The primary contribution of JELAI is its flexible technical foundation, designed to empower educators and researchers to build and study the next generation of pedagogically-informed AI learning tools.