Inspiration
Students often struggle with a topic because of an earlier knowledge gap. Someone confused by recursion, for example, may actually be missing an understanding of base cases, function calls, or the call stack.
Most AI tutors immediately explain the topic. RootLearn asks a different question: *What foundational knowledge is preventing this learner from understanding it?*
RootLearn is an AI-powered knowledge debugger that finds the gap behind the confusion.
What it does
A learner can start with:
“I understand functions, but recursion still confuses me.”
RootLearn then:
- Identifies the target concept and generates its prerequisite knowledge map.
- Asks adaptive diagnostic questions.
- Evaluates correctness, reasoning, and confidence.
- Updates mastery directly on the knowledge map.
- Detects the earliest important weakness—the root gap.
- Guides the learner through that missing concept.
- Uses teach-back to verify real understanding.
- Tracks mastery improvements over time.
Instead of simply giving answers, RootLearn shows learners what they are missing, why it matters, and what to learn next.
How we built it
The frontend uses Next.js, React, TypeScript, Tailwind CSS, React Flow, and TanStack Query. The backend uses FastAPI, Python, PostgreSQL, SQLAlchemy, Pydantic, and NetworkX.
We deliberately separated responsibilities:
- AI handles concept identification, question generation, answer evaluation, and explanations.
- Deterministic services handle graph validation, mastery calculations, diagnostic selection, session state, and root-gap detection.
NetworkX validates prerequisite relationships as a directed acyclic graph, making the learning process structured and explainable.
Challenges we ran into
One major challenge was keeping mastery changes synchronized with the interactive knowledge map. We solved this by automatically refreshing session, graph, and progress data after each evaluation.
We also had to handle asynchronous graph generation and unreliable AI-provider availability. We added clear session states, retry support, and a deterministic fallback so the core learning experience remains usable.
Another challenge was generating prerequisite graphs that were both educationally meaningful and visually understandable.
Accomplishments we're proud of
RootLearn goes beyond a standard AI chatbot. Every learner interaction changes a structured model of their knowledge.
We built:
- Interactive prerequisite knowledge maps
- Adaptive AI diagnostics
- Real-time mastery and confidence tracking
- Root knowledge-gap detection
- Guided learning and teach-back verification
- Progress history
- AI-provider failure recovery
- Automated frontend and backend tests
Most importantly, learners can see not only what to study next, but why.
What we learned
We learned that educational AI requires more than connecting an interface to an LLM. AI output needs validation, learning state needs deterministic logic, and recommendations need to be explainable.
The biggest insight was simple: finding the right prerequisite can sometimes be more valuable than immediately explaining the final topic.
What's next
We plan to add user accounts, personalized learning paths, spaced repetition, specialized programming and mathematics evaluation, voice learning, teacher dashboards, and multilingual support.
Our long-term goal is to make RootLearn a system that doesn't just answer questions—it understands where learning broke down and helps rebuild from the root.
Built With
- css
- fastapi
- html
- python
- typescript

Log in or sign up for Devpost to join the conversation.