Inspiration

Most students today copy-paste essay prompts into AI chatbots and get a polished answer back—bypassing critical thinking completely. Meanwhile, teachers only discover which students are actually struggling weeks later when grades drop.

EduAgent flips that paradigm: "Using AI to teach students how NOT to depend on AI." Instead of writing essays for students, it challenges their claims through a 3-turn Socratic debate, forces human revision, and connects teachers and parents early with deterministic intervention signals.


What it does

1. Student Socratic Portal (Zero-Answer-Leak Coaching)

  • 3 Input Modes + Human Gate 1: Students can type an essay, paste a public Google Doc link, or upload a photo of handwritten notes (archived to Neon S3 and transcribed verbatim—keeping spelling mistakes and skipping crossed-out words—with cross-model verification between Gemini Vision and Gemma 4 / Qwen Vision so students review text before debating).
  • Adaptive 4-Persona Routing: A deterministic persona_selector matches reasoning weaknesses (unsourced claim, hasty generalization, non sequitur, etc.) to one of 4 anchored coaches—The Skeptic, The Devil's Advocate, The Nitpicker, or The Expander—and breaks stuck streaks automatically by rotating personas when a student plateaus.
  • Deterministic Answer-Leak Guard: Every AI question passes through a zero-LLM regex validator (validate_debate_turn()) that blocks answer leaks, enforces exactly 1 Socratic question per turn, and falls back safely if retries fail.
  • Metacognitive Self-Correction Loop: After 3 turns, students view a 4-axis 2D SVG Cognitive Radar (Logical Coherence, Evidence Quality, Counterargument Handling, Scope Awareness) and rewrite 1 refined thesis claim to earn a bounded Growth Bonus.

2. Teacher Command Center & Parent Co-Pilot

  • Deterministic Intervention Priority Index (Zero LLM Vibes): Students are ranked transparently in code (priority_engine.py), never by an LLM prompt: $$\text{Priority} = 3.0(\text{stuck_streak}) + 2.5(\text{score_decline}) + 1.0(\text{inactivity_weeks}_{\le 4}) + 1.5(\text{shared_fallacies}) + 1.5(\text{volatility})$$
  • Executive Digests & 15-Minute Mini-Lessons: After evaluations, Tier 2 clusters class-wide fallacies shared by 2+ students, synthesizes an HTML briefing via Resend (or a compose-only Gmail draft), and logs every action to an immutable PostgreSQL audit_logs table.
  • Parent Co-Pilot: Generates warm, non-alarming 1–2 sentence home conversation starters from deterministic priority signals—never auto-emailing parents without teacher review.

How we built it

  • Backend & Orchestration: Python, FastAPI (uvicorn), OpenTelemetry tracing, and a modular multi-node ADK2 pipeline (intake → sanitizer → multimodal_ocr → summarizer → persona_selector → debate_loop → challenge_validator → cognitive_scorer → profile_mutator).
  • Multi-Provider AI + Automatic Failover: Google AI Studio (gemini-3.5-flash-lite, gemini-3-flash-preview, gemma-4-26b-a4b-it) with automatic Groq failover (openai/gpt-oss-120b → openai/gpt-oss-20b → qwen/qwen3.8-27b) on 429/5xx/timeout errors.
  • Persistence & Delivery: Neon PostgreSQL 18.7 (7 tables with row-level locking, TTL debate sessions, and audit_logs), Neon S3-compatible Object Storage, Resend API, and Railway deployment.
  • Frontend: Responsive single-file SaaS UI (Plus Jakarta Sans, Light/Dark theme, inline SVG radar & sparklines, and a Judge 1-Click Showcase Bar).

Challenges we ran into

  • Cross-Model OCR Latency & Reliability: During live testing, gemma-4-26b-a4b-it occasionally timed out (504) on handwritten photos, stalling OCR for ~50 seconds. Adding fast-failover to Groq Vision (qwen/qwen3.8-27b) reduced transcription time to ~11 seconds while keeping difflib cross-model consistency checks intact.
  • Preventing AI Drift & Score Farming: Early prototypes risked persona drift across turns and duplicate reflection submissions. We fixed this by re-injecting persona anchors on every turn and claiming reflection eligibility atomically (SELECT ... FOR UPDATE) in PostgreSQL before calling the evaluator.
  • Theme Isolation on Email Previews: Rendering light-mode HTML email digests inside a dark-mode teacher dashboard caused CSS inheritance leaks until isolated in .digest-preview-box.

Accomplishments that we're proud of

  • 50 / 50 Deterministic Eval Suite (scripts/run_eval_suite.py --strict, zero LLM-as-judge) verified with intentional sabotage tests.
  • 395 Automated Pytest Tests (393 offline unit/integration + 2 live E2E tests; 78% statement coverage across 3,404 statements, with 96–100% on core OCR, debate, mutator, priority, and validator modules).
  • Zero-Console-Error Verified Live Stack: Tested button-by-button via Chrome DevTools MCP across desktop and mobile (390×844) viewports.

What we learned & AI Tools Disclosure

  • Deterministic-First Engineering: LLMs should phrase prose and ask Socratic questions, while ranking math, prompt-injection stripping, answer-leak detection, and tenancy/auth checks belong in deterministic, unit-tested code.
  • AI Tools Disclosure: Built solo by Nishant Maurya during the CSC Winter Sparkathon window. AI coding assistants (Antigravity / Gemini / Claude) were used for boilerplate acceleration, UI/CSS refactoring, and test-case expansion; all system architecture, deterministic rubrics, bug audits, and live verification runs were directed and verified by the author.

What's next for EduAgent

  • Classroom Pilot & Educator Feedback: Partner with teachers to run a controlled cohort trial measuring long-term critical-thinking transfer.
  • Verified Custom Email Domain: Move Resend delivery from sandbox ([email protected]) to a verified custom school domain for direct teacher-inbox delivery.
  • Teacher Rubric Customization: Allow instructors to configure custom debate turn counts and subject-specific fallacy taxonomies per class.

Quick Demo Access (For Judges)

Built With

Share this project:

Updates

Submission history