The Concept Refinement Agent is the star feature of Sprout’s adaptive learning system. After a student answers diagnostic questions, this agent personalizes the subconcept graph by:
Adding bridge subconcepts for knowledge gaps
Removing mastered subconcepts to avoid boredom
Inserting prerequisite concepts for foundational gaps
Adds a bridge or remedial subconcept for knowledge gaps.Input:
{ "title": "BST Deletion Edge Cases", "description": "Handling deletion when node has two children", "prerequisiteIds": ["sub5"], "reason": "Student struggled with deletion question - needs focused practice on edge cases"}
Observation: Student scored 50% on diagnostics. Strong performance on searching/insertion but struggled with traversals and deletion.Detected confusion between traversal types.Student history shows 0.85 mastery on "Arrays and Strings" and 0.72 on "Linked Lists".Overall level: intermediate. Learning pace: moderate.Current graph has 10 subconcepts. Tree traversal subconcept exists but may be too brief.Reasoning: 1. Add bridge subconcept on "Traversal Comparison" to clarify differences2. Add remedial subconcept on "Deletion with Two Children" (common edge case)3. Keep searching/insertion subconcepts but mark as "review" priority4. Don't remove any subconcepts - student needs full coverageActions:- add_subconcept: "In-order vs Pre-order vs Post-order Comparison"- add_subconcept: "Deletion: Node with Two Children"- No removalsVerification: Running validate_graph...Result: All nodes reachable, no orphans. Graph valid.
add_subconcept({ "title": "In-order vs Pre-order vs Post-order", "description": "Visual comparison of traversal types with examples", "prerequisiteIds": ["sub5-basic-traversals"], "reason": "Student confused traversal types in diagnostic"})
2
Add deletion edge case
add_subconcept({ "title": "Deletion: Node with Two Children", "description": "Finding successor/predecessor and swapping", "prerequisiteIds": ["sub7-basic-deletion"], "reason": "Diagnostic revealed gap in deletion edge cases"})
Use SSE streaming to provide real-time feedback. Show reasoning steps and graph changes as they happen so students understand why their path is being adapted.