Inspiration

Many PTE learners understand the meaning of a dictated sentence but still lose marks on articles, plural endings, prepositions, and other quiet words. Normal answer checking shows what was wrong, but it rarely explains what the learner should listen for on the next replay

PTE Flow already detected word-level errors and scheduled weak sentences for spaced repetition. We built AI Mistake Coach to close the gap between seeing an error and knowing how to train it

What it does

After each incorrect Write From Dictation attempt, PTE Flow evaluates the answer locally and identifies exact missing, extra, or misspelled words. AI Mistake Coach then returns:

  1. A concise diagnosis of the listening pattern
  2. A plain-English explanation grounded in the detected error
  3. Focus words taken from the correct sentence
  4. A short listen-and-repeat micro-drill
  5. One practical instruction for the next replay

The original score and spaced-repetition schedule remain deterministic. AI explains the evidence but cannot change it

How we built it

The mobile app uses Kotlin Multiplatform and Compose Multiplatform for shared Android and iOS code. The new shared Ktor client sends only the current sentence, learner answer, and machine-detected mistakes to a protected Vercel function. The function validates the payload, calls Azure OpenAI, validates structured JSON, and returns the coach insight

The backend never receives learner identity, account data, subscription state, or long-term history. Credentials remain server-side, and the mobile build uses a separate judging secret

How Codex and GPT-5.6 helped

We built the complete extension during OpenAI Build Week in one Codex task using GPT-5.6. Codex inspected the existing monorepo, traced the evaluator and player state flow, designed the structured API contract, implemented the KMP client and Compose experience, created and deployed the serverless backend, wrote validation tests, and drove the Android verification flow

The main human product decision was to avoid a generic chatbot. The coach is constrained by deterministic mistake evidence so its output stays specific, explainable, and useful during a ten-minute daily practice session

Challenges

The most important challenge was balancing personalisation with trust. Letting a model grade answers would make the learning loop less predictable. We kept scoring local and deterministic, then used AI only where language reasoning adds value: explaining why a small word may disappear in connected speech and turning that diagnosis into an immediate drill

The second challenge was adding a network feature without breaking the offline-first flow. The answer is always scored and saved first. If the coach is unavailable, practice progress is preserved and the user can retry coaching separately

Accomplishments

  1. A working, non-trivial AI feature inside an existing production-quality learning app
  2. Shared Android and iOS implementation rather than a platform-specific prototype
  3. Grounded and structured model output with failure handling
  4. A live protected backend with automated validation tests
  5. A verified end-to-end Android flow with video and runtime evidence

What we learned

The best AI education experience is not always a chat interface. A small, well-grounded explanation placed at the exact moment of error can be more useful than an open-ended tutor

What's next

Next, PTE Flow will aggregate repeated coach signals into a private weakness profile, measure changes such as fewer missed articles over seven days, and recommend the drills with the highest likely score impact

Built With

  • azure-openai
  • codex
  • compose-multiplatform
  • gpt-5.6
  • kotlin-multiplatform
  • ktor
  • openai-api
  • vercel
Share this project:

Updates