The problem
Planned lessons cover planned situations. Real shifts don’t: a nurse might need to explain a delay to a family, or ask a colleague to repeat an order, and want the right English for it now. The founder’s PRD asked for an always-available coach for exactly these moments,.
Who it was for
Nurses and clinicians preparing for, or already working in, English-speaking hospitals. They need one clear, safe answer to the situation in front of them, then a quick way to practise it. Eklan is training software, so the coach helps with communication and stays out of clinical decisions.
My role
I turned the founder’s PRD into a buildable design and built the coach: the structured-output layer, the output checker, English and Korean PII redaction, the eval suite, the drill job queue, audio and pronunciation practice, and the interface. Admins can change who has access (plan, pilot list and a kill switch) without a redeploy.
What I built
One problem per chat
A learner brings one real situation from their shift. The coach works out what kind of help it is, may ask one clarifying question, answers, and the chat is locked once the problem is solved.
Text or voice, Korean or English
Learners type or record a voice note in Korean, English or a mix of both, and can correct the transcript before the coach reads it.
Structured outputs with versioned schemas
The coach answers as Gemini structured output against a versioned schema, with versioned prompts, so every answer has the same shape and old answers stay readable after a change.
A rule-based output checker
Checks in code reject answers that invent a dose, mark a correct sentence as wrong, or carry on when the question contains sensitive data that needs a clarification first. A failed check gets one retry, then a safe fallback.
Privacy before storage
Names, record numbers and IDs are redacted in English and Korean before anything is stored or sent on. Analytics events carry only IDs and codes, never free text.
From chat to drill
A solved chat can become a personal drill. Audio plays in the learner's accent with a slow option, and say-it-aloud practice gives word-level pronunciation feedback.
The design maps five kinds of help a learner might need to the five drill types the platform already had, so a solved chat can become practice without a new kind of exercise. Requests that drift towards treatment advice meet a clear boundary: the coach helps with how to say something, not with what to do clinically.
How it works
A question arrives as text or a voice note and is redacted before anything is stored. The coach answers as structured output, rules in code check the answer, and the chat is locked once the problem is solved. A background job then turns the solved chat into a personal drill.
Decisions that mattered
I chose agree the design with the founder first, then build in gated tasks over starting to code from the PRD as written because settling one problem per chat, resolve-and-lock, five kinds of help mapped to five drill types, and a clear boundary for requests about treatment kept the build small and safe
I chose a rule-based checker in code after the model over trusting a well-written prompt because the failures that matter most here, like an invented dose, are easy to detect in code and too costly to leave to the model
I chose a leased job queue with unique indexes over generating the drill inside the chat request because drill generation is slow and can fail; a queue with leases, retries and unique indexes lets it retry safely without ever creating a duplicate drill
Hard problems I solved
ProblemThe MVP had a tight deadline, so every step had to be small enough to check.
FixI wrote the design up first, split the build into 8 gated tasks, and made release depend on a 48-case eval run against the live model.
ProblemLearners sometimes paste real details from their shift into the chat.
FixRedaction runs in English and Korean before storage or any onward call, and sensitive data in a question makes the coach ask for a clarification instead of answering.
ProblemBackground work on serverless functions can be cut off or run twice.
FixDrill jobs take a lease, get three attempts with a backoff of thirty seconds and then two minutes, re-check for cancellation before writing, and are swept by a Vercel cron every minute. Unique indexes in MongoDB make a retry harmless.
Tech stack
- Model and checks
- Server and data
- TypeScript: Coach, checker, redaction and job queue
- Next.js: Route handlers and background work
- MongoDB: Chats, jobs, leases and unique indexes
- Vercel: Cron sweep, staging and production
- Speech and media
- ElevenLabs: Playback in the learner's accent, with a slow option
- SpeechAce: Say-it-aloud pronunciation feedback
- Cloudinary: Cached audio
- Interface and analytics
- React: Chat interface in 6 languages, checked at 390 px wide
- PostHog: Events with IDs and codes only
Outcome
The coach went to staging once it passed its release gate. The gate was a 48-case eval suite run against the live model, and it climbed over three rounds of fixes:
| Round | Cases passing |
|---|---|
| First run | 44/48 |
| After the first fixes | 47/48 |
| Release | 48/48, with all 23 critical cases passing |
Detection of the kind of help a learner needed was right in 100% of the eval cases, and the feature shipped with 238 unit tests.
What I learned
A tight deadline is manageable if the first step is deciding what not to build.
Agreeing the design with the founder first did more for the deadline than any shortcut in the code. Gating the release on an eval run, rather than on a demo that looked right, is what made it safe to ship quickly.
What I’d do next
Grow the eval suite from the questions learners actually ask once the coach is in wider use, keeping the redaction rules in front of anything that gets saved.