Inspiration

Every student uses AI. Professors know it. The campus knows it. The question isn't whether students will use AI — it's how. Right now, the pattern is depressingly simple: paste homework into ChatGPT, copy the answer, learn nothing. UMD already provides TerpAI to every student, but it has zero guardrails against this cycle.

We asked ourselves: What if AI refused to give you the answer — and instead connected you with the person who could teach you?


What it does

TerpTutor transforms TerpAI from an answer machine into a learning partner that builds a campus-wide Knowledge Network. Start a tutoring session, and our platform:

  • Forces Socratic learning — the AI is structurally prevented from giving direct answers, instead guiding students through problems with leading questions and hints
  • Triggers reflection checkpoints — every 4 exchanges, students must explain what they've learned in their own words before continuing
  • Extracts learning fingerprints — AI analyzes each session to map a student's strengths, misconceptions, and topic mastery into a structured profile
  • Matches complementary peers — LLM-scored compatibility matching pairs students whose strengths fill each other's gaps
  • Schedules study sessions with AI — students describe availability in natural language, AI proposes optimal times and builds a study agenda from both fingerprints
  • Facilitates voice-powered group study — two students sit together, say "Hey Terp", and a voice AI moderator guides their session using both their learning profiles

The AI facilitates, but humans teach each other. The more students use TerpTutor, the less they need the AI. That's not a bug — that's the product.


How we built it

Our architecture layers Socratic prompt engineering on top of UMD's TerpAI infrastructure, then builds a social knowledge graph around it:

Socratic Intelligence Layer:

  • Server-side prompt wrapping intercepts every student message and injects subject-specific Socratic instructions — the student never sees or controls the system prompt
  • Reflection checkpoints with structured AI evaluation (what you got right, misconceptions identified, next steps)
  • Learning fingerprint extraction — AI parses each session into structured JSON: strengths, weaknesses, topics, and insights

Knowledge Network:

  • LLM-scored peer matching — TerpAI compares fingerprints pairwise, rates compatibility 1-10 with explanations
  • Topic overlap heuristic pre-filters candidates before expensive LLM calls
  • Natural language scheduling — AI extracts time slots from conversational availability descriptions, proposes meetings with study agendas tailored to both students' gaps
  • Contact exchange — email, Discord, and phone only revealed after both students accept

Voice Group Study:

  • Web Speech API with continuous listening, interim results, and auto-restart on Chrome silence timeouts
  • Fuzzy wake word detection — ~20 variant spellings handle speech-to-text misrecognitions of "Hey Terp" ("hey turp", "hey turf", "hey twerp"...)
  • ElevenLabs TTS for spoken AI responses with echo prevention (mic pauses during playback)
  • Fingerprint-aware facilitation — the AI moderator knows both students' strengths and actively suggests who should explain what to whom

Infrastructure:

  • Next.js full-stack app with 17 API routes
  • Server-side in-memory store enables real multi-user testing across browsers
  • TerpAI SSE parsing handles base64-encoded Server-Sent Events with conversation chaining via segment IDs

Challenges we ran into

  • TerpAI returns base64-encoded Server-Sent Events instead of JSON — required custom SSE parsing
  • Tokens expire every ~30 minutes with no refresh endpoint, demanding careful session management
  • Web Speech API on Chrome silently stops listening after periods of silence — built auto-restart logic
  • Speech-to-text consistently misrecognizes "Hey Terp" — solved with fuzzy matching across ~20 known variants
  • Browser autoplay policies blocked TTS audio on Windows — switched to persistent audio elements initialized on user gesture
  • Cross-browser state sharing (Chrome + Edge testing the same knowledge network) required migrating from localStorage to a shared server-side store
  • Getting the AI to reliably output structured JSON fingerprints from free-form tutoring conversations

Accomplishments that we're proud of

  • Built an AI that makes itself unnecessary — the more students teach each other, the less they need the AI
  • Created an end-to-end pipeline from raw tutoring conversation → structured learning fingerprint → peer match → scheduled study session → voice-facilitated group study
  • Solved the "AI cheating" problem not with restrictions, but by making the AI structurally incapable of giving direct answers
  • Demonstrated real multi-user flows with cross-browser connection requests, scheduling, and contact exchange
  • Built voice-powered group study with wake word detection, TTS, and fingerprint-aware facilitation — all in a browser
  • Shipped 6 phases and 17 API routes in a hackathon weekend

What we learned

  • Socratic prompt engineering is surprisingly robust — the AI consistently refuses to give answers even when students try to trick it
  • Learning fingerprints are the key unlock — once you have structured data about what students know and don't know, peer matching, scheduling, and facilitation all become tractable
  • Voice interfaces in the browser are harder than expected — Chrome's Speech API has undocumented silence timeouts and speech-to-text errors that require creative workarounds
  • Server-side prompt wrapping is essential for integrity — if the student controls the prompt, they can bypass any guardrail
  • Network effects matter — TerpTutor gets more valuable with every student who uses it, because the matching pool grows

What's next for TerpTutor

  • Persistent database (Supabase/Postgres) to replace in-memory store and survive server restarts
  • Struggle Maps — aggregate anonymized fingerprints to show professors where their class is struggling in real-time
  • Longitudinal learning paths — track mastery across multiple sessions and courses
  • Campus Study Network — persistent study groups that evolve as members' fingerprints change
  • Academic integrity reports for institutional adoption — prove TerpTutor reduces answer-copying
  • Per-student OAuth through UMD SSO for production rollout
  • Mobile-responsive design for on-campus use between classes

Built With

  • elevenlabs
  • next.js
  • peer-matching
  • react
  • shadcn-ui
  • socratic-prompting
  • tailwind-css
  • terpai
  • typescript
  • voice-ai
  • web-speech-api
Share this project:

Updates