Inspiration

In STEM education, students who struggle with high school math or physics are rarely failing because they lack intelligence. Instead, they are stuck because of a missing foundational prerequisite concept from 2 or 3 grades ago—such as algebraic equation rearrangement, ratio manipulation, or vector resolution.

Traditional coaching and generic AI tutors fail by treating these gaps horizontally: when a student fails a Class 9 physics question on momentum, current tools simply generate another wall of text summarizing physics. Teaching the top floor when the foundation is cracked causes systemic academic frustration. Furthermore, with modern educational curricula moving toward continuous conceptual and oral evaluations, teachers in overcrowded classrooms (often with 60+ students) are overwhelmed and lack the tools to conduct individual diagnostic check-ins.

We were inspired to create ConceptRoots to shift the paradigm from passive AI summaries to cognitive root-cause diagnosis ("Concept MRI") and active Feynman-style verification.

What it does

ConceptRoots is an AI-powered diagnostic and practice learning engine that pinpoints and repairs the exact missing concept behind a student's learning barrier:

  1. Multimodal Problem Scan: The student uploads a photo of any handwritten or textbook math, physics, or science problem.
  2. Vertical Prerequisite Extraction: Powered by Gemini 3.6 Flash, the engine reads the problem image and maps a 4-level vertical dependency graph of lower-level prerequisite concepts leading up to the target problem.
  3. Adaptive Micro-Diagnosis: The system runs 3 rapid micro-checks starting at the lowest foundational concepts rather than testing high-level topics.
  4. Concept MRI Knowledge Graph: An interactive visual graph renders mastered nodes in green, highlights the exact broken root node in red/amber, and blocks downstream progress until the root cause is addressed.
  5. Dual Repair Pathways:
    • Practice It (Quiz): Generates a single-concept micro-quiz focused strictly on the broken prerequisite.
    • Explain It (Oral / Teach-Back): Prompts the student to explain the reasoning in their own words via voice recording or text. Gemini evaluates the response for true cause-and-effect reasoning rather than rigid keyword matching.
  6. Root Repair Verification: Upon successful verification, the red node turns green, confirming that the foundation is repaired and allowing the student to move forward.

How we built it

  • Frontend & UI: Built with Next.js 16 App Router, React 19, TypeScript, Tailwind CSS 4, shadcn/ui, Radix UI primitives, Lucide icons, and next-themes for seamless dark/light modes.
  • Multimodal AI Core: Integrated @google/genai (SDK v2.16.0) using Gemini 3.6 Flash (gemini-3.6-flash) for rapid image parsing, vision analysis, and text evaluation.
  • Deterministic Structured AI Outputs: Enforced strict JSON schemas using Gemini's native responseJsonSchema paired with Zod schemas. This ensures 100% type-safe JSON returns for graph node hierarchies and quiz options without parsing errors.
  • Oral Evaluation & Web Audio: Developed browser audio recording capabilities connected to Gemini's reasoning evaluator (verifyExplanation) to assess student speech transcripts.
  • Enterprise Resilience: Built an automated API orchestration utility (withGeminiFallback) supporting key rotation and exponential backoff to handle rate limits (HTTP 429) gracefully.
  • Database & Auth Integration: Configured with Supabase SSR (@supabase/ssr) for persistent state and user session management.

Challenges we ran into

  • Multimodal Graph Reliability: Vision models can sometimes produce unstructured text. Getting Gemini to consistently analyze complex mathematical imagery and output a strict 4-level ordered prerequisite DAG required careful prompt engineering and rigid Zod schema validation.
  • Reasoning vs. Keyword Matching: Traditional automated grading looks for rigid key phrases. We engineered Gemini prompts to evaluate conceptual cause-and-effect logic so students aren't penalized for using informal phrasing or local idioms while explaining concepts.
  • API Resiliency Under Load: High API traffic during testing led to rate limits. We built a resilient fallback handler that cycles through API keys and handles rate-limit retries seamlessly.

Accomplishments that we're proud of

  • The Concept MRI Visualization: Building an interactive visual knowledge graph that dynamically updates node statuses from blocked to gap to mastered as students complete diagnostics and repair exercises.
  • True Active-Recall Learning: Moving completely away from generic AI solutions and walls of text, creating an engine that forces active student engagement and teach-back reasoning.
  • Lightning-Fast Multimodal Analysis: Achieving near-instant vision extraction and micro-assessment generation with Gemini 3.6 Flash.
  • Polished Vertical Slice: Delivering a responsive, accessible, dark/light mode-compatible Next.js 16 application with interactive audio and visual feedback.

What we learned

  • Shift-Left EdTech Diagnostics: Diagnosing root prerequisite gaps before presenting main course material dramatically improves student confidence and retention compared to standard re-explanation.
  • Power of Gemini Structured Outputs: Relying on native responseJsonSchema with Zod completely eliminates JSON syntax errors and simplifies complex UI state management in React 19.
  • Multimodal Teach-Back Feasibility: AI vision and speech evaluation have reached a level of maturity where automated oral assessments can genuinely scale in overcrowded classrooms.

What's next for ConceptRoots

  • Teacher Dashboard & Class Insights: Building an analytics portal where teachers can view class-wide Concept MRI heatmaps (e.g., identifying that "65% of Class 9 physics students lack linear equation rearrangement skills").
  • Localized Multilingual Audio (Bangla Voice Support): Adding direct speech-to-text support for native regional languages like Bangla for Bangladeshi national curriculum classrooms.
  • Physical Object Feynman Verification: Enhancing the multimodal prompt to have students point their phone camera at real-world physical objects in their room while explaining a physics concept (e.g., demonstrating lever balance or friction).
  • Long-Term Spaced Repetition: Integrating long-term memory schedules with Supabase to re-test repaired root concepts after 7, 14, and 30 days.

Built With

  • adaptive-learning
  • ai-feedback
  • ai-tutoring
  • cloud-integration
  • computer-vision
  • concept-diagnosis
  • edtech
  • educational-technology
  • firebase
  • gemini-api
  • google-ai
  • google-gemini
  • json-schema
  • knowledge-graph
  • learning
  • learning-analytics
  • mathematical-reasoning
  • multimodal-ai
  • ocr
  • personalized-learning
  • prerequisite-mapping
  • stem-education
  • typescript
  • voice-assessment
  • zod
Share this project:

Updates

Submission history