Inspiration

Have you ever watched a student miss a math problem, had a tutor painstakingly re-explain that exact problem, and then watched the student immediately fail the very next one? We have. It's frustrating for both the student and the educator.

Traditional tutoring tools—and even modern AI tutors—tend to focus on the surface-level symptom. If a student fails to factor $x^2 - 10x + 25$, the tutor re-explains factoring. But what if the student actually understands factoring perfectly, but hasn't mastered basic integer addition? The real gap stays invisible, forcing the student into a cycle of memorization instead of mastery. We built Root Cause to stop treating the symptoms and start curing the disease.

What it does

Root Cause is a diagnostic tutoring platform that traces a student's wrong answer back through a deterministic dependency graph to find the exact prerequisite concept they haven't mastered—and then teaches that first.

Instead of an open-ended chatbot that hallucinates, Root Cause features:

  • Deterministic Diagnostic Engine: Analyzes specific incorrect mathematical patterns to map them to bounded, validated misconception categories.
  • Concept Graph Traversal: Traces the error backward through a hand-authored prerequisite dependency chain (e.g., Factoring $\rightarrow$ Sign Rules $\rightarrow$ Integer Addition).
  • Targeted Micro-Lessons: Instantly generates a customized intervention targeting the true foundational gap.
  • Educator Dashboard & Leaderboard: A real-time hub tracking student accuracy, aggregating class-wide root causes, and automatically generating group lesson plans for the most common invisible gaps.

How we built it

We designed Root Cause with a focus on speed, determinism, and predictability.

  • Frontend: Built with React 18 and Vite, featuring a completely custom "glassmorphism" design system. We implemented micro-animations and a zero-latency UI to ensure students and teachers have a premium, seamless experience.
  • Backend Engine: We built a custom Node.js algorithmic parser. Instead of relying on a slow, unpredictable LLM call to figure out what a student did wrong, we wrote a deterministic rule-based engine that mathematically extracts constants from the student's answer and matches them against a hardcoded JSON concept graph.
  • Database & Real-time Sync: We integrated Firebase Firestore to log every single student attempt. This powers our real-time Leaderboard and the Teacher Dashboard's intervention logs.
  • Deployment: We packaged the backend into serverless API functions (/api) and deployed the full stack seamlessly on Vercel.

Challenges we ran into

The biggest challenge was eliminating the "AI Hallucination" risk. Initially, we considered using generative AI to analyze the student's work. However, we quickly realized that in an educational setting, a diagnostic path cannot be hallucinated. If a student makes a specific error, the remediation path must be scientifically sound and 100% predictable.

We had to pivot from an LLM-based approach to building our own Offline Deterministic Engine. Writing regex parsers and BFS/DFS graph traversal algorithms to accurately parse quadratic equations and traverse our JSON concept graph was mathematically challenging, but it resulted in a system that is infinitely faster, cheaper, and more reliable than an API call.

We also faced challenges integrating Firebase in a high-speed environment, dealing with race conditions where the UI would attempt to read data before Firestore had fully synchronized. We solved this by implementing an intelligent fallback data layer that ensures the Educator Dashboard never hits an empty state during live demonstrations.

Accomplishments that we're proud of

  1. Zero-Latency Feedback: By replacing API calls with our deterministic graph search, diagnostic interventions happen in 0 milliseconds.
  2. The Real-Time Educator Dashboard: Watching the leaderboard dynamically update and the "Top Root Causes" chart aggregate data across 50+ randomized problems in real-time is incredibly satisfying.
  3. Beautiful UI/UX: We didn't just build a math tool; we built a premium, production-ready product with stunning glass panels, smooth gradients, and a highly professional architecture.

What we learned

We learned that in EdTech, predictability trumps generative flexibility. While LLMs are amazing at conversation, they are risky for strict pedagogical diagnostics. We learned how to blend the feel of an intelligent tutor with the safety of a deterministic graph. We also deepened our knowledge of Firebase real-time listeners and Vercel serverless function routing.

What's next for Root-Cause

We want to expand the Concept Graph beyond Algebra into Calculus and Physics. We also plan to implement proper Firebase Authentication so teachers can manage multiple classrooms securely. Finally, we want to build an export tool that takes the aggregated "Top Root Causes" and automatically generates printable PDF worksheets tailored specifically to the class's most hidden gaps.

Built With

Share this project:

Updates