Back to Curriculum
Week 11Portfolio Project #3 — Capstone

Adaptive Learning Assistant

Your capstone portfolio project. Build an AI tutor that adapts to each student's level, tracks their knowledge over time, and provides personalized learning paths — the kind of tool that EdTech companies are paying $80K+ to have people build.

Student ModelingKnowledge GraphsConversational AIPersonalizationLearning Analytics
Lesson Guide

Weekly Roadmap

From understanding adaptive learning theory to shipping your most impressive portfolio piece.

Day 1

Adaptive Learning Theory & Student Modeling

Learning Objectives

  • Understand the principles of adaptive learning and intelligent tutoring systems
  • Learn student modeling: what data to track and how to represent knowledge state
  • Explore Bayesian knowledge tracing and mastery-based learning
  • Study Zone of Proximal Development (ZPD) and scaffolding strategies
  • Analyze existing adaptive learning platforms (Khan Academy, Duolingo)

Activities

  • Case study: How Khan Academy's mastery system works under the hood
  • Workshop: Design a student knowledge model for a subject you taught
  • Exercise: Map a curriculum into a prerequisite knowledge graph
  • Discussion: Ethics of adaptive learning — personalization vs. privacy
Day 2

Conversational AI Tutor Design

Learning Objectives

  • Design a multi-turn conversational AI tutor with context memory
  • Build system prompts that maintain pedagogical best practices
  • Implement Socratic questioning — guiding students to answers instead of giving them
  • Handle misconceptions: detect and gently correct wrong mental models
  • Manage conversation state and learning progress across sessions

Activities

  • Lab: Build a Socratic tutoring prompt that asks guiding questions
  • Exercise: Implement conversation memory with message history
  • Pair work: Role-play as student and AI — find where the AI fails
  • Workshop: Design your tutor's personality, tone, and pedagogical style
Day 3

Knowledge Tracking & Backend Architecture

Learning Objectives

  • Design a PostgreSQL schema for student profiles, sessions, and knowledge states
  • Build API routes for managing learning sessions and progress
  • Implement knowledge state updates based on quiz/interaction results
  • Create an algorithm to select the next best topic or question
  • Add analytics endpoints for visualizing learning progress

Activities

  • Workshop: Design the database schema together on the whiteboard
  • Lab: Implement the student model and knowledge tracking tables
  • Exercise: Build the topic selection algorithm
  • Testing: Write tests for knowledge state transitions
Day 4

Chat Interface & Learning Dashboard

Learning Objectives

  • Build a real-time chat interface with streaming AI responses
  • Implement a student dashboard showing knowledge progress
  • Create visual representations of the learning path (progress bars, graphs)
  • Add session history and the ability to resume previous conversations
  • Design a teacher/admin view for monitoring student progress

Activities

  • Lab: Build the chat UI with streaming response rendering
  • Exercise: Create the knowledge progress dashboard with charts
  • Workshop: Design the learning path visualization component
  • Polish: Add micro-interactions and smooth transitions
Day 5

Final Assembly, Deploy & Capstone Demo

Learning Objectives

  • Integrate all components into a cohesive application
  • Deploy to Vercel with database and API key configuration
  • Write a comprehensive README with architecture docs
  • Record a 5-minute capstone demo video for your portfolio
  • Present to the cohort and receive feedback from guest evaluators

Activities

  • Sprint: Final bug fixes, polish, and integration testing
  • Workshop: Record your demo video with best practices for presentation
  • Capstone Demo Day: 5-minute presentations with Q&A
  • Retrospective: Reflect on your growth from Week 1 to now
Project Brief

Capstone Project: LearnLoop

An adaptive AI learning assistant that personalizes education in real time.

Overview

Build "LearnLoop" — an AI-powered adaptive learning assistant for a subject of your choice. The tutor converses with students using Socratic questioning, tracks their mastery of individual topics, and dynamically adjusts the difficulty and focus of the conversation based on demonstrated understanding. A dashboard shows students their learning progress, and a teacher view provides class-wide analytics.

Core Features

Subject selection: Students choose a topic/subject to learn
AI chat tutor: Multi-turn conversation with Socratic questioning approach
Adaptive difficulty: Questions and explanations adjust to student level
Knowledge tracking: Track mastery per topic (0-100% confidence)
Learning path: Visual map of topics with prerequisites and current progress
Session memory: Resume conversations and retain context across sessions
Progress dashboard: Charts showing mastery growth over time
Teacher view: Monitor multiple students' progress and identify struggles

Database Schema

-- Students table
CREATE TABLE students (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  name        TEXT NOT NULL,
  email       TEXT UNIQUE NOT NULL,
  created_at  TIMESTAMPTZ DEFAULT now()
);

-- Subjects and topics
CREATE TABLE topics (
  id            UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  subject       TEXT NOT NULL,
  name          TEXT NOT NULL,
  description   TEXT,
  prerequisites UUID[] DEFAULT '{}',
  "order"       INT DEFAULT 0
);

-- Student knowledge state per topic
CREATE TABLE knowledge_states (
  student_id    UUID REFERENCES students(id),
  topic_id      UUID REFERENCES topics(id),
  mastery       DECIMAL(5,2) DEFAULT 0.0,  -- 0-100
  attempts      INT DEFAULT 0,
  last_seen     TIMESTAMPTZ DEFAULT now(),
  PRIMARY KEY (student_id, topic_id)
);

-- Chat sessions
CREATE TABLE sessions (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  student_id  UUID REFERENCES students(id),
  topic_id    UUID REFERENCES topics(id),
  started_at  TIMESTAMPTZ DEFAULT now(),
  ended_at    TIMESTAMPTZ
);

-- Chat messages
CREATE TABLE messages (
  id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  session_id  UUID REFERENCES sessions(id),
  role        TEXT NOT NULL, -- 'user' | 'assistant'
  content     TEXT NOT NULL,
  created_at  TIMESTAMPTZ DEFAULT now()
);

Capstone Grading Rubric

CriteriaWeightExcellent (A)Good (B)Needs Work (C)
Adaptive Intelligence30%Tutor clearly adapts to student level, uses Socratic method, tracks & updates mastery meaningfullySome adaptation visible, basic knowledge tracking, inconsistent Socratic approachNo real adaptation, static responses regardless of student level
Technical Architecture25%Clean API design, proper database schema, streaming chat, session persistenceWorking API, basic database, some persistenceFragile API, no database, no session persistence
User Experience20%Beautiful chat UI, clear progress visualization, intuitive navigation, mobile responsiveFunctional chat, basic progress display, mostly responsiveBare-bones UI, no progress visualization, desktop-only
Pedagogical Soundness15%Clear learning path design, appropriate scaffolding, effective misconception handlingReasonable learning structure, some scaffoldingNo clear pedagogical approach, random topic selection
Demo & Documentation10%Compelling 5-min demo, architecture diagram, README with setup guideWorking demo, basic documentationDemo has issues, minimal documentation

Daily Milestones

MondayKnowledge graph designed, student model defined, project scaffolded with DB schema
TuesdayChat tutor working with Socratic prompts, multi-turn conversation with memory
WednesdayKnowledge tracking functional, topic selection algorithm, all API routes done
ThursdayChat UI polished with streaming, progress dashboard built with visualizations
FridayDeployed to Vercel, 5-min demo video recorded, capstone presentation complete

Stretch Goals

  • Add voice input/output using the Web Speech API for accessibility
  • Implement spaced repetition scheduling for review sessions
  • Build a collaborative mode where students can learn together
  • Add gamification elements (XP, streaks, badges) to boost engagement
  • Create an API that other developers could use to embed your tutor
Starter Code

Key Implementation Snippets

lib/tutor/system-prompt.ts
export function buildTutorPrompt(params: {
  subject: string;
  topic: string;
  studentMastery: number; // 0-100
  previousMisconceptions: string[];
}) {
  const level =
    params.studentMastery < 30 ? "beginner" :
    params.studentMastery < 70 ? "intermediate" : "advanced";

  return `You are a patient, encouraging AI tutor
specializing in ${params.subject}.

CURRENT TOPIC: ${params.topic}
STUDENT LEVEL: ${level} (${params.studentMastery}% mastery)

TEACHING APPROACH:
- Use the Socratic method: ask guiding questions
  instead of giving answers directly
- For beginners: use simple language, concrete
  examples, and analogies from everyday life
- For intermediate: introduce formal terminology,
  ask "why" and "how" questions
- For advanced: pose challenging scenarios,
  encourage critical thinking and connections

KNOWN MISCONCEPTIONS TO ADDRESS:
${params.previousMisconceptions.map(m =>
  `- ${m}`).join("\n") || "None identified yet"}

RULES:
1. Never give the answer directly — guide the
   student to discover it
2. If the student is stuck, provide a hint, not
   the solution
3. Celebrate correct answers and gently redirect
   incorrect ones
4. After 3-4 exchanges on a concept, assess
   understanding with a targeted question
5. If mastery seems high, suggest moving to the
   next topic
6. Keep responses concise (2-3 paragraphs max)`;
}
lib/tutor/knowledge-tracker.ts
// Simple Bayesian knowledge tracing update
export function updateMastery(
  currentMastery: number,
  wasCorrect: boolean,
  difficulty: number // 1-5
): number {
  // Learning rate varies by difficulty
  const learningRate = 0.1 + (difficulty * 0.05);

  // Slip probability (correct answer by guessing)
  const slipRate = 0.1;

  // Guess probability
  const guessRate = 0.25;

  if (wasCorrect) {
    // Bayesian update for correct answer
    const pCorrectGivenKnow = 1 - slipRate;
    const pCorrectGivenNotKnow = guessRate;
    const prior = currentMastery / 100;

    const posterior =
      (pCorrectGivenKnow * prior) /
      (pCorrectGivenKnow * prior +
       pCorrectGivenNotKnow * (1 - prior));

    // Apply learning rate
    return Math.min(
      100,
      currentMastery + (posterior * 100
        - currentMastery) * learningRate
    );
  } else {
    // Decrease mastery on incorrect answer
    return Math.max(
      0,
      currentMastery - learningRate * 15
    );
  }
}