Skip to main content

Overview

Sprout adapts your learning path in real-time based on diagnostic assessments and ongoing performance. Unlike static courses that force everyone through the same content, Sprout’s AI agents observe your strengths and gaps, then restructure the knowledge graph to match your needs.
Adaptive learning happens at multiple levels: subconcepts, concepts, and entire topic paths can be modified based on your performance.

Diagnostic Assessment System

Pre-Concept Diagnostics

Before teaching any concept, Sprout runs a diagnostic assessment to understand your current knowledge:

Question Generation

The Subconcept Bootstrap Agent creates 5-10 diagnostic questions per concept—mixed multiple-choice and open-ended.

Difficulty Variation

Questions span easy to challenging to accurately map your understanding across the concept spectrum.

Single Pass

Diagnostics are one-time assessments (no repeats) to minimize testing overhead while gathering key insights.

Optional Completion

You can skip diagnostics entirely, but answering them unlocks powerful personalization.

Question Formats

Format: mcq
  • 4 answer options
  • Single correct answer
  • Instant feedback after submission
  • Stored as { selectedOption: string } in the database
{
  "format": "mcq",
  "prompt": "What is the time complexity of binary search?",
  "options": ["O(n)", "O(log n)", "O(n²)", "O(1)"],
  "correctAnswer": "O(log n)"
}

Grading Process

When you submit diagnostic answers, the Concept Refinement Agent triggers the Grade Answers Agent:
  1. Extract answers: Latest answer per question
  2. Call grading sub-agent: Claude evaluates each response
  3. Store results: isCorrect (boolean), score (0.0-1.0), feedback (string)
  4. Update database: Graded answers persist for downstream analysis
// From concept-agent.ts
const graded = await gradeAnswers(conceptNode.title, gradableQuestions);

for (const result of graded) {
  await db.update(answers)
    .set({
      isCorrect: result.isCorrect,
      score: result.score,
      feedback: result.feedback,
    })
    .where(eq(answers.id, latestAnswer.id));
}

Graph Adaptation (ORAV Loop)

After grading, the Concept Refinement Agent enters its Observe-Reason-Act-Verify loop:

1. Observe Phase

The agent calls get_current_subconcepts to view the existing subconcept DAG:
{
  "subconcepts": [
    { "id": "...", "title": "Binary Search Trees", "prerequisites": [] },
    { "id": "...", "title": "Tree Traversal", "prerequisites": ["..."] }
  ]
}

2. Reason Phase

Claude analyzes the data to identify:

Mastered Content

Subconcepts you already understand based on diagnostic performance. These can be removed to save time.

Knowledge Gaps

Missing prerequisites indicated by wrong answers. Requires adding bridge subconcepts.

Misconceptions

Specific incorrect beliefs (e.g., confusing pass-by-value vs. pass-by-reference). Needs targeted remediation.

3. Act Phase

The agent has powerful tools to restructure your learning path:
Tool: add_subconceptCreates new subconcept nodes for:
  • Bridge topics that fill prerequisite gaps
  • Remedial content for misconceptions
  • Enrichment for advanced learners
{
  title: "Pass-by-Reference Fundamentals",
  description: "Clarify memory vs. value semantics",
  prerequisiteIds: ["variables_concept_id"],
  insertBefore: "pointers_subconcept_id"
}

4. Verify Phase

Tool: validate_graph After making changes, the agent calls validation to ensure graph integrity:
  • Orphan detection: All nodes must be reachable from the root
  • Broken edges: Source and target nodes must exist
  • Cycle detection: DAG structure must be preserved
  • BFS traversal: Confirms every node is in the connected component
If issues are found, the agent fixes them and verifies again before completing.
The double-verify pattern ensures no malformed graphs are ever committed to the database.

Mastery Tracking

Subconcept Mastery

As you work through tutoring sessions, the Tutor Agent tracks mastery at the subconcept level:
// From tutor-chat.ts
await db.insert(userNodeProgress).values({
  userId,
  nodeId: subconceptNodeId,
  masteryScore: calculatedScore,  // 0.0 to 1.0
  completed: masteryScore >= 0.7,
  updatedAt: new Date(),
});
Mastery thresholds:
  • 0.0 - 0.4: Struggling (tutor provides more examples)
  • 0.5 - 0.6: Developing (tutor asks follow-up questions)
  • 0.7 - 1.0: Mastered (tutor marks complete, unlocks next nodes)

Exercise Recording

Tool: record_exercise_result After each tutoring exercise:
  1. Student’s answer is stored
  2. Correctness is evaluated
  3. Mastery score is updated (running average)
  4. Progress record is updated in userNodeProgress table

Prerequisite Checking

Tool: check_prerequisite_mastery Before teaching a subconcept, the tutor verifies:
  • All prerequisite subconcepts are marked completed: true
  • Mastery scores meet threshold (≥0.7)
  • Edges in the graph match actual readiness
If prerequisites aren’t met, the tutor redirects you to complete them first.

Personalization Examples

Example 1: Mastered Content Removal

Scenario: You ace diagnostic questions about basic loops. Adaptation:
  1. Concept Refinement Agent sees 100% correctness on loop questions
  2. Reasons that “For Loops” and “While Loops” subconcepts are redundant
  3. Removes both subconcepts from the graph
  4. Reconnects edges to “Nested Loops” (next topic)
  5. Validates graph integrity
  6. Result: You skip 2 subconcepts and save ~30 minutes

Example 2: Knowledge Gap Insertion

Scenario: You miss questions about variable scope. Adaptation:
  1. Concept Refinement Agent sees 0% correctness on scope questions
  2. Reasons that “Lexical Scoping” is a missing prerequisite
  3. Calls add_subconcept to insert “Lexical Scoping Fundamentals”
  4. Wires it as prerequisite to “Closures” subconcept
  5. Validates graph
  6. Result: You learn the foundation before tackling advanced topics

Example 3: Concept-Level Adjustment

Scenario: Diagnostic reveals you lack fundamental algebra skills. Adaptation:
  1. Concept Refinement Agent sees widespread struggles across calculus diagnostics
  2. Reasons that entire algebra prerequisite concept is missing
  3. Calls add_prerequisite_concept to insert “Algebraic Foundations”
  4. Repositions current concept to depend on new prerequisite
  5. Validates graph
  6. Result: A new concept node appears in your topic path

Continuous Adaptation

Adaptation doesn’t stop after diagnostics:

Mid-Tutoring Adjustments

If you struggle during tutoring sessions, the Tutor Agent can request on-the-fly graph changes (feature in development).

Post-Completion Review

After completing a concept, the Review Learning Path Agent suggests enrichment topics or remediation if patterns suggest gaps.

Cross-Concept Learning

The system tracks performance across multiple concepts, identifying global strengths and weaknesses.

Difficulty Calibration

Exercise difficulty adapts based on recent mastery scores—harder problems appear when you’re excelling.

Technical Implementation

Database Schema

Adaptive learning relies on persistent state:
// User progress per node
userNodeProgress: {
  userId: string,
  nodeId: string,
  masteryScore: number,     // 0.0 to 1.0
  completed: boolean,
  exercisesAttempted: number,
  updatedAt: Date
}

// Diagnostic answers
answers: {
  id: string,
  userId: string,
  questionId: string,
  answerData: JSON,         // { selectedOption } or { text }
  isCorrect: boolean,
  score: number,            // 0.0 to 1.0
  feedback: string,
  submittedAt: Date
}

Agent Communication

Agents share data via tool results:
// Concept Refinement Agent calls Grade Answers Agent
const graded = await gradeAnswers(conceptTitle, questions);

// Grade Answers Agent returns structured data
return [
  {
    questionId: "...",
    isCorrect: false,
    score: 0.3,
    feedback: "Your answer confused pass-by-value with pass-by-reference..."
  }
];
This enables complex multi-agent workflows without tight coupling.

Benefits of Adaptive Learning

Time Efficiency

Skip content you’ve already mastered. Focus only on knowledge gaps.

Reduced Frustration

Avoid being thrown into advanced topics without proper prerequisites.

Personalized Pacing

Fast learners progress quickly; those who need more time get additional support.

Targeted Remediation

Address specific misconceptions instead of reviewing entire topics.

Enrichment Opportunities

High performers unlock advanced content and enrichment topics.

Transparent Logic

Watch agent reasoning in real-time via SSE events—understand why changes happen.
Adaptive learning is the core differentiator that makes Sprout an AI tutor, not just an AI content generator.

Build docs developers (and LLMs) love