Inspiration

Students preparing for high-stakes university and professional exams often fall victim to the "illusion of competence": passively reading textbooks and flipping flashcards feels productive, but when asked to explain a concept out loud, recall fails.

Cognitive science shows that active oral recall (explaining ideas in your own words) and spaced repetition are the golden standard for durable learning. Yet, modern study tools remain bound to screens and keyboards.

With Alexa+ and the Model Context Protocol (MCP), ambient voice computing can finally move beyond basic command timers. We built Study Buddy to turn Alexa+ into an autonomous oral study tutor—one that understands spoken paraphrasing, diagnoses conceptual gaps, mathematically calibrates quizzes to your skill tier, and aligns review schedules with your real exam date.

What it does

Study Buddy is an autonomous spoken voice companion and MCP server for Alexa+, paired with a responsive web companion app:

Semantic Depth Scoring: Evaluates spoken student answers by conceptual meaning rather than brittle keyword matching. Calculates a continuous depth score (( \text{depthScore} \in [0, 100] )), assigns a tier (mastery, solid, partial, developing), and isolates missing concepts into actionable diagnostic notes (weakPartNotes). Mathematical Placement Diagnostics: Runs a 6-question balanced diagnostic across three difficulty tiers (Recall, Application, Analysis). While oral answers are graded semantically, capability tiering is computed via pure weighted mathematics: $$ \text{Score} = \frac{\sum_{i=1}^{N} \left(\text{Difficulty}_i \times \text{Credit}i\right)}{\sum{i=1}^{N} \text{Difficulty}_i} $$ Assigns a verified proficiency level (beginner, intermediate, advanced) and rebuilds calibrated 8-question curricula targeting weak spots. Cognitive Spaced Repetition (SuperMemo SM-2): Schedules memory consolidation using the SuperMemo SM-2 algorithm. Recalls update ease factors dynamically: $$ \text{EF}' = \max\left(1.3, ;\text{EF} + \left(0.1 - (5 - q) \times \left(0.08 + (5 - q) \times 0.02\right)\right)\right) $$ Intervals expand geometrically (( I(1)=1\text{d}, I(2)=6\text{d}, I(n)=\text{round}(I(n-1) \times \text{EF}) )), with misses (( q < 3 )) routed into an in-session retry queue. Dynamic Exam Horizon Pacing: Students set deadlines using relative speech ("My exam is in 5 days"). Study Buddy projects 7-day retention forecasts and calculates sustainable daily targets: $$ \text{dailyNew} = \left\lceil \frac{\text{unlearnedCards}}{\max(1, \text{daysUntilExam} - \text{bufferDays})} \right\rceil $$ Multi-Modal Visual Cheat Sheets: Synthesizes multi-page canvas cheat sheets featuring SVG diagrams, exam "gotchas", and active recall prompts for visual reinforcement. Proactive Study Nudges & Calendar Sync: Delivers SSE push notifications for streak protection and exam countdowns (( T-7, T-3, T-1 )), plus RFC 5545 iCalendar (.ics) export.

How we built it

Study Buddy is architected as an offline-resilient, multi-tier system:

Alexa+ MCP Server: Built with @modelcontextprotocol/sdk, Express, and TypeScript, exposing 19 production MCP tools (plus a 20th virtual clock tool for demo simulations) over Streamable HTTP (/mcp). Dual-Engine AI Architecture: Integrated @aws-sdk/client-bedrock-runtime via the Bedrock Converse API (POST /api/generate) for Amazon Nova Pro/Lite/Micro. Conversational tutoring, note deconstruction, and depth grading run with high throughput via Gemini 3.5 Flash with strict Zod schemas and offline Porter-stemmer fallbacks. Voice Synthesis: Streamed binary MP3 audio directly via AWS Polly (Danielle Generative / Joanna Neural) on POST /api/tts, with ElevenLabs and browser Web Speech APIs as resilient fallbacks. Deterministic Core: Scheduling (SM-2), level estimation, exam pacing, anti-objective card filters (( \le 25 ) words), and calendar generation are pure mathematical functions with zero non-deterministic LLM variance. Web Companion: React 19 + Vite frontend featuring a morphing voice bubble (idle, listening, thinking, speaking), live captions, topic mastery graphs, and interactive canvas notes.

Challenges we ran into

Voice Latency vs. LLM Inference: Alexa+ expects tool responses within ~800ms–1200ms. Cold-start LLM latencies risked dropped voice turns, requiring aggressive timeout limits and streaming fallbacks. Bedrock Validation Exceptions: Invoking amazon.nova-pro-v1:0 returned ValidationException: Operation not allowed without detailing the root cause (account tier, quotas, or billing). We logged this in our Friction Log and kept the Bedrock integration alongside our fast LLM pipeline. Precautionary SSE Keep-Alives: Because reverse proxies often terminate idle connections after 60 seconds, we implemented synthetic keep-alive comment pings (: ping\n\n) to protect long oral quiz sessions. Anti-Objective Filtering: Generative models often produce vague syllabus summaries instead of testable facts. We engineered an automated validator rejecting cards over 25 words or containing syllabus filler buzzwords.

Accomplishments that we're proud of

216 Automated Tests Passing: Vitest test suite spanning 28 files passes 100% offline in seconds, validating every algorithmic formula, injection defense, and scheduling transition. Substantive Conceptual Understanding: Students can answer naturally in their own words; Study Buddy grades underlying depth rather than exact phrasing. Deterministic Level Estimation: Built a reliable, mathematically grounded placement engine that auto-rebuilds curricula based on diagnostic weak spots. Actionable Friction Log: Documented 5 concrete developer friction entries with reproduction steps and architectural recommendations for Amazon's developer platforms.

What we learned

Math Belongs in Code, Not Prompts: Prompting LLMs to compute dates or SM-2 intervals creates hallucination and drift. Placing cognitive science mathematics in deterministic TypeScript and using LLMs purely for semantic understanding produced a reliable, robust system. Ambient Voice Demands Extreme Brevity: Spoken feedback must be punchy and direct; answers over 25 words sound tedious when spoken aloud. MCP Protocol Parity: Exposing functionality through standard Model Context Protocol allows the same backend logic to serve Alexa+, AI agents, and custom web frontends interchangeably.

What's next for Study Buddy

Native Alexa+ Device Deployment: Packaging the MCP manifest for live rollout across Echo Show and Echo devices. Syllabus & Slide Ingestion: Adding multi-modal document analysis to deconstruct slide decks and PDFs into oral flashcard decks. Voice Profile Personalization: Utilizing Alexa voice profiles to support separate study schedules and topic mastery trees for multiple household learners.

Built With

Share this project:

Updates

Submission history