Testera

Demo Video Live App Built with Amazon Nova AWS Bedrock

πŸ’‘ Inspiration

Millions of students sit high‑stakes exams every year, GMAT, GRE, SAT, GAMSAT, LSAT, IELTS. Most of them study the wrong things, not because they're lazy, but because their tools have no idea who they are. They review topics they've already mastered, miss the patterns behind their mistakes, and lose focus between questions while static question banks just serve the next card. In a world of infinite tabs and notifications, students sit down to study and lose the thread within minutes, not because they're "too distracted" but because nothing in their prep environment responds.

I know this because I lived it. I was a strong student growing up, the kind of kid who picked things up fast and didn't need to try too hard. But as I got older, the world got louder. I loved doing multiple things at once, jumping between interests, chasing whatever felt exciting in the moment. Somewhere along the way I lost the thread. Not because I stopped being capable, but because I didn't know what I wanted, and without that clarity, motivation just evaporates. You sit down to study and twenty minutes later you're three tabs deep in something completely unrelated.

Testera's focus tracker was built for exactly that moment. I wanted to build a coach that actually pays attention because I needed one myself.

Testera closes that gap with an AI coach that adapts to you in real time β€” powered by Amazon Nova via Bedrock.


πŸ› οΈ What It Does

Feature What it means for the student
Adaptive question engine Questions adapt in real time using 3PL IRT β€” no wasted time on topics you've mastered
AI study coach (Tera) Agentic Nova 2 Lite companion β€” proactively calls tools mid-conversation, streams token-by-token with visible tool-use pills
IELTS Speaking Examiner Nova 2 Sonic speech-to-speech β€” the only AI IELTS speaking tool that actually speaks back
Snap a Problem Photo any textbook page or whiteboard β†’ Nova generates a calibrated practice question in seconds
SM-2 Spaced Repetition SuperMemo SM-2 auto-schedules reviews at the exact moment before you forget
Nova Study Planner One click generates a personalised week-by-week schedule from your IRT ability + SM-2 weak topics
Writing scorer IELTS Task 1/2 and GAMSAT Section 2 essays scored by Nova with band-level feedback in seconds
Focus tracker Detects tab switches and idle time β€” surfaces where your attention actually goes
Gamification XP, streaks, achievements, and micro-celebrations to keep momentum going

πŸ—οΈ How I Built It

Architecture

Student β†’ Next.js 14 Frontend β†’ FastAPI Backend β†’ Amazon Bedrock (Nova 2 Lite)
                                      ↓
                              PostgreSQL (performance data)
                                      ↓
                          Amazon Polly (voice output)

Streaming (converseStream)

Tera's responses stream token-by-token in real time using the Bedrock converseStream API:

Student types β†’ POST /companion/stream β†’ converseStream β†’ SSE chunks β†’ browser renders live

Each SSE event: data: {"delta": "<text>"} β€” the frontend appends each chunk as it arrives, giving a natural "thinking" effect with zero perceived latency. Credits are charged before streaming begins; on error they're refunded automatically.

Question generation

Each question uses exam-specific prompting with explicit difficulty calibration and quality requirements. The system prompt identifies the generator as an expert psychometrician for that specific exam:

DIFFICULTY CALIBRATION:
- Difficulty 7/10 means ~32% of test-takers get it wrong.
- Use advanced concepts with 3+ step reasoning.

QUALITY REQUIREMENTS:
1. Only ONE answer can be correct (unambiguous)
2. All distractors must be plausible common errors
3. Self-contained β€” no external references needed
4. Consistent numbers and values throughout

No regex hacks, no brittle parsing. If Nova returns malformed JSON, the circuit breaker falls back to the cached question bank.

Tera's coaching logic

Tera's behaviour is shaped by a focused system prompt with exam-domain vocabulary. When a student gets a question wrong, the explanation prompt includes the specific wrong answer chosen so Tera addresses the exact misconception, not just the correct answer. Domain vocabulary (GMAT critical reasoning traps, GAMSAT Section III patterns, IELTS band descriptors) roughly doubles output quality on the same model. A smarter prompt beats a bigger model.


Amazon Nova Integration

Testera uses all four major Nova capabilities, text generation, speech-to-speech, multimodal understanding, and tool use.

1. Nova 2 Lite β€” Core intelligence

Every question, explanation, study plan, and writing score runs through eu.amazon.nova-2-lite-v1:0 via the Bedrock Converse API in eu-west-1 (GDPR jurisdiction).

Streaming: Tera's chat responses stream token-by-token using converseStream β†’ Server-Sent Events β†’ browser. Zero waiting, natural "thinking" effect.

Tera is an agentic system. For authenticated users, Tera runs a Nova tool-use loop before every reply. She has three tools:

Tool What it does
get_weak_topics Pulls the student's SM-2 weak topics in real time
generate_question Generates a calibrated practice question on demand
get_study_plan Fetches or generates the student's personalised Nova study plan

Nova decides autonomously which tool (if any) to call. Each call renders as a pill above Tera's reply, e.g. ✦ Tera checked your weak topics β€” so the agentic behaviour is visible inside the actual product. Anonymous users get the plain streaming path.

Question generation: Exam-specific system prompts with explicit difficulty calibration (1–10 scale), distractor quality rules, and dual-critic verification. Nova returns strict JSON, no regex hacks.

Study Planner: POST /users/study-plan sends the student's IRT ΞΈ + SM-2 weak topics + target score to Nova and gets a concrete week-by-week daily schedule back. Cached 24 hours per user.

2. Nova 2 Sonic β€” IELTS Speaking Examiner

Route: /speaking β€” the only AI-powered IELTS speaking practice tool that uses real speech-to-speech.

Student holds mic button β†’ browser captures PCM16 audio (16 kHz, mono)
  β†’ POST /api/speaking/turn (multipart)
    β†’ invoke_model_with_bidirectional_stream (amazon.nova-2-sonic-v1:0, us-east-1)
      β†’ Nova Sonic processes speech, generates examiner response
        β†’ LPCM 24 kHz audio streamed back β†’ browser plays immediately

The examiner follows the official IELTS Speaking format across three parts:

  • Part 1 β€” 5 personal questions on familiar topics
  • Part 2 β€” Cue card given, 1-minute prep timer, candidate speaks 1–2 minutes
  • Part 3 β€” Abstract discussion questions related to the Part 2 topic

At the end, Nova 2 Lite evaluates the full conversation transcript and returns a band score breakdown (Fluency & Coherence, Lexical Resource, Grammatical Range, Pronunciation) with specific, actionable feedback.

Fallback: If Nova Sonic is unavailable, the examiner role falls back to Nova 2 Lite text generation + AWS Polly TTS β€” the student experience is never interrupted.

Voice: Ruth (British English neural)

3. Nova Multimodal β€” Snap a Problem

Route: /snap β€” photo any textbook page, whiteboard, or diagram and get a calibrated practice question in seconds.

Student uploads / cameras an image
  β†’ POST /api/snap/question
    β†’ Nova 2 Lite converse() with image bytes + exam_type
      β†’ Structured JSON: topic, difficulty, question, 4 options, correct_index, explanation
        β†’ Student answers inline, sees full explanation

Nova reads the image, identifies the mathematical concept or logical principle shown, and generates an original practice question inspired by (not copying) that content, calibrated to the chosen exam (GMAT, GRE, SAT, GAMSAT, LSAT, IELTS).

Nova multimodal embeddings (amazon.nova-2-multimodal-embeddings-v1:0, 384 dimensions) also run silently on each image to enable future similarity search, connecting a student's photo to the most relevant weak areas in their profile.

Voice Pipeline

Student speaks β†’ Web Speech API β†’ FastAPI β†’ Nova 2 Lite (text response)
                                                    ↓
                                         Amazon Polly (neural TTS, streaming PCM)
                                                    ↓
                                         AudioContext β†’ student hears Tera

Nova and Polly are parallelised, Polly starts streaming audio from the first sentence while Nova is still generating the rest. This cuts perceived latency significantly.

On the input side, the browser Web Speech API transcribes speech to text, which is sent to the backend and passed into Nova as the next user message. No third-party STT service required.


πŸ“Š What I Learned

Two weeks is a short runway. Here's what actually mattered:

1. Prompt engineering beats model size Adding exam-specific vocabulary and structured JSON schemas to the system prompt roughly doubled output quality on the same Nova 2 Lite model. A smarter prompt is almost always cheaper than a bigger model.

2. IRT is worth the complexity IRT is worth the complexity. A simple difficulty ladder would have been faster to build. But the 3PL model gives you a real ability estimate β€” one you can map to actual exam scales and explain to a student. That credibility matters.

3. Parallelise everything you can Parallelise everything you can. Starting Polly TTS on the first sentence while Nova generates the rest cut perceived latency more than any infrastructure change. Users feel the difference immediately.

4. Fallback strategy is not optional Rate limits and API errors happen. Caching a bank of pre-generated questions as a fallback ensures students never see a broken experience β€” they just get slightly less adaptive questions for a session.


🚧 Challenges

Keeping Tera proactive, not annoying. The hardest UX problem was deciding when Tera should speak up unprompted. Too early and she interrupts thinking. Too late and the student has already disengaged. The solution was a focus tracker: client-side monitoring of idle time, scroll behaviour, and question re-reads to detect genuine confusion before intervening.

Latency in voice + adaptive feedback. Combining Nova inference + Polly TTS + adaptive question selection in one response cycle created latency spikes. Fixing this required parallelising the Nova call and the Polly synthesis β€” Nova generates text while Polly begins streaming audio from the first sentence.

One backend, six exams. GMAT, GRE, SAT, GAMSAT, LSAT, and IELTS have completely different question formats, scoring rubrics, and content domains. Building a single adaptive engine that handles all of them required abstracting the exam config into a clean JSON schema so Nova receives exam-specific context without the core engine knowing anything about individual exams.


🌍 Impact

Testera makes high‑quality, adaptive, voice‑enabled test preparation available to anyone with a browser whether or not they can afford a tutor or premium course and it keeps them focused on learning instead of getting lost in extra tabs and notifications.


πŸ€ Responsible AI

All practice questions and explanations are AI-generated original content β€” not reproductions of official exam items:

  • No proprietary or licensed exam questions are fed into Nova
  • Questions are clearly presented as AI-generated practice material, not official exam items
  • Testera does not imply endorsement by ETS, GMAC, College Board, ACER, or any other exam body
  • Authenticated users can flag any question as incorrect or low-quality β€” every report is reviewed
  • Testera is for practice only, not official scoring or academic advice

See User Guide for full details.


πŸ™ Acknowledgements

  • Amazon Web Services β€” Nova 2 Lite, Bedrock, Polly, SES, Aurora, ECS Fargate, and the Nova Hackathon team for making this possible
  • Vercel β€” seamless Next.js deployment and Edge CDN
  • FastAPI β€” the backbone of the backend
  • The IRT research community β€” particularly the foundational work on 3PL models and Newton–Raphson ability estimation that Testera's adaptive engine is built on
  • Every student who's ever been told "just study harder" β€” this one's for you

Built With

Share this project:

Updates