Mastery Score System
Every node (concept or subconcept) has a mastery score that represents your level of understanding:- 0.0 — Not started or complete lack of understanding
- 0.3-0.5 — Partial understanding, significant gaps
- 0.7 — Mastery threshold (considered “mastered”)
- 1.0 — Complete mastery
The mastery threshold of 0.7 is used throughout Sprout to make learning decisions. For example, the tutor checks if prerequisite subconcepts have
masteryScore >= 0.7 before teaching dependent concepts.Progress Data Structure
Progress is tracked in theuserNodeProgress table:
Unique Constraint
Each user can have only one progress record per node (enforced by unique index onuserId + nodeId).
Retrieving Progress
Get progress for all nodes:Recording Progress
When you enter a node for the first time:firstEnteredAt= current timestamplastEnteredAt= current timestampattemptsCount= 1masteryScore= 0.0
lastEnteredAtis updated to current timestampattemptsCountis incremented- Other fields remain unchanged
The system uses app-level upsert logic (not database-level UPSERT) — it checks for existing records and either creates or updates accordingly.
Updating Mastery Scores
Update mastery score after completing exercises:masteryScore is typically updated by:
- Tutor Agent — Calls
record_exercise_resultafter you answer checkpoint questions correctly - Concept Refinement Agent — May adjust scores based on diagnostic results
- Manual updates — Via the API if needed
How Mastery Scores Increase
During tutoring, the Tutor Agent uses therecord_exercise_result tool:
Completion Tracking
When Is a Node Complete?
A node is considered complete when:- Mastery score ≥ 0.7 (the mastery threshold)
completedAttimestamp is set
completedAt field is typically set:
- When the tutor finishes teaching all chunks and you’ve answered all checkpoint questions
- When the Concept Refinement Agent determines you’ve already mastered the concept (and removes it from your path)
Marking Nodes Complete
[COMPLETE].
Progress Analytics
The Concept Refinement Agent uses thecheck_student_history tool to analyze your progress across the entire learning path:
- Should we add prerequisite concepts?
- Can we remove subconcepts you’ve already mastered?
- Should we add enrichment material?
The agent doesn’t just look at the current concept — it analyzes your performance across all related concepts to understand your overall level and learning patterns.
Progress in the Learning DAG
Progress through your learning path follows the DAG structure:- Start nodes — Nodes with no prerequisites (no incoming edges)
- Dependent nodes — Nodes that require prerequisites to be mastered first
- Completion — When all nodes in a concept or topic are completed
Checking Prerequisites
Before teaching a subconcept, the Tutor Agent callscheck_prerequisite_mastery:
Accuracy Score vs. Mastery Score
Nodes also have anaccuracyScore field (0-1) which is different from masteryScore:
nodes.accuracyScore— Stored on the node itself, represents average performance across all users (future feature)userNodeProgress.masteryScore— User-specific score representing individual mastery
accuracyScore defaults to 0 and isn’t actively used. All personalization is based on masteryScore.
Attempts Tracking
TheattemptsCount field tracks how many times you’ve entered a node:
- Useful for identifying nodes you’re struggling with
- Incremented every time you call
POST /api/progressfor an existing record - Used by the Review Learning Path agent to decide if enrichment material is needed
High
attemptsCount with low masteryScore indicates you’re stuck. The system may suggest adding bridge subconcepts or prerequisite concepts to help you build foundations.Generation Status
ThehasGeneratedSubnodes flag tracks whether subconcepts have been generated for a concept:
Example: Full Learning Journey
- Create topic → Upload documents → Generate learning path
- Enter first concept →
POST /api/progresscreates record withattemptsCount: 1 - Take diagnostic → Answer questions → Concept refined
- Enter first subconcept →
POST /api/progresscreates subconcept record - Tutor teaches chunk 1 → Answer checkpoint →
masteryScoreincreases from 0.0 to 0.15 - Complete all chunks →
masteryScorereaches 0.7 →completedAtset → Session ends - Move to next subconcept → Tutor checks prerequisites, sees 0.7 mastery, allows progress
- Repeat for all subconcepts in the concept
- Complete concept → Overall progress tracked across all subconcepts
Viewing Overall Progress
To see your progress across an entire topic:- Query all nodes in the topic (by
branchIdorparentId) - Query progress for each node
- Calculate:
- Total nodes vs. completed nodes
- Average mastery score
- Which nodes are currently available (prerequisites met)
- Which nodes are blocked (prerequisites not met)
Post-Completion Review
After completing a concept or subconcept, you can trigger the Review Learning Path agent:- Enrichment concepts — Advanced topics for deeper understanding
- Reinforcement subconcepts — Extra practice for weak areas
The Review Learning Path agent uses your progress data, diagnostic results, and overall mastery patterns to make intelligent decisions about enrichment. It won’t add material you don’t need.
Next Steps
- Use progress data to visualize your learning journey
- Identify struggling areas and request additional help
- Track mastery scores over time to measure improvement
- Complete all subconcepts to master entire concepts