Compute Word Error Rate and Flag Critical Clinical Misrecognitions

Last updated: November 29, 2026

Quick Overview

Given a reference transcript and an ASR hypothesis, compute word error rate via minimum edit alignment, report substitution, deletion and insertion counts, and list errors that hit words from a set of clinically critical terms (doses, drug names, negations).

Abridge
Coding & Algorithms
Machine Learning Engineer
Abridge
November 29, 2026
Machine Learning Engineer
Technical Screen
Coding & Algorithms
Medium

0

0

0 solved


Given a reference transcript and an ASR hypothesis, compute word error rate via minimum edit alignment, report substitution, deletion and insertion counts, and list errors that hit words from a set of clinically critical terms (doses, drug names, negations).

Speech recognition quality on medical vocabulary drives everything downstream at Abridge, and plain WER hides whether the model dropped a negation or misheard a dose. The interviewer wants a correct DP with a backtrace and a sensible argument for weighting critical errors.

What the Interviewer Expects
  • Set up the Levenshtein DP over words
  • Backtrace to classify S, D, I
  • Normalize case and tokenization
  • Report critical-term errors separately
  • Discuss O(nm) cost and when it matters
Key Topics to Cover
Dynamic programming
Edit distance
ASR evaluation
Backtracking
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you compute WER over a 40 minute encounter efficiently?
  • How would you treat equivalent forms like 10 mg vs ten milligrams?
  • Why might a model with lower WER still produce worse notes?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

WER = (S + D + I) / N where N is the reference word count. We also want the error breakdown and any error where the reference word is critical (a substitution of ten with two matters far more than...

High-Level Design

Standard edit distance dp[i][j] over reference prefix i and hypothesis prefix j with unit costs. Then walk back from (n, m), preferring the diagonal when it is consistent, to label each step as ma...


Submit Your Answer
Markdown supported

Related Questions