The Assistant Ignores an Instruction 10% of the Time. Fix It.
The interviewer asksYour assistant is told to always reply in the customer's language, but about 10% of Spanish conversations get English replies. How do you fix it?
Forward Deployed EngineerAI Product EngineerCoreTechnical roundRepresentative5–7 min
On this page
The 30-second version
- Read the failing conversations first; find what they have in common.
- Check the context, not just the instruction: English retrieved docs or tool output pull replies into English.
- Fix where the cause is: language instruction near the end, the detected language stated explicitly, a final check.
- Add a code check: detect the reply's language and regenerate if it's wrong.
- Build an eval set of multilingual conversations and track the mismatch rate.
What it's really testing
- Diagnosing from examples instead of guessing
- Knowing that context drives behaviour
- Layering a deterministic check
- Measuring the fix
How to structure your answer
- Look at failures and find the pattern.
- Check the context, not only the instruction.
- Fix the cause, then add a safety net.
- Measure with an eval set.
The interview, played out
- InterviewerYour assistant is told to always reply in the customer's language, but about 10% of Spanish conversations get English replies. How do you fix it?
- CandidateBefore changing anything, I'd pull 30 or so failing conversations and look for what they have in common. Long conversations? Particular topics? Tool use?
- Revealed when askedAlmost all of them involved retrieving help-centre articles, which are only in English.
- Strong moveDiagnoses from real examples before editing the prompt.
- CandidateThat's the likely cause. The context fills up with English text and the model follows it. The instruction is still there, but it's outweighed by a lot of English right before the reply.
- InterviewerHow do you fix it?
- CandidateThree layers. First, restate the rule right at the end of the context, after the documents: "The customer is writing in Spanish. Reply in Spanish." The detected language is stated explicitly, not left to inference. Second, a code check on every reply: detect the reply's language, and if it doesn't match, regenerate once with a stronger instruction. Third, longer term, translate or summarise the retrieved articles into the customer's language before the model sees them.
- InterviewerWhy not just translate the docs from the start?
- CandidateIt's the cleanest fix but the most work, and translations go stale as articles change. The instruction placement and the check get us most of the way this week.
- InterviewerHow will you know it worked?
- CandidateAn eval set of real Spanish conversations that use retrieval, with the language check as the grader, tracking the mismatch rate before and after.
- Missed signalShould include other languages too, so the fix doesn't only work for Spanish.
- CandidateAnd I'd include French and German conversations too, so we're not fixing one language and breaking another.
The strong answer, distilled
- Diagnose: failures cluster on conversations that retrieve English-only articles.
- Cause: English context outweighs the instruction.
- Fix in layers: state the detected language explicitly and restate the rule after the documents; a code check on the reply's language with one regeneration; longer term, translate or summarise retrieved content.
- Measure: an eval set of multilingual conversations with retrieval, graded by a language-detection check; track mismatch rate.
This is one strong answer, not the only one.
How it's scored
| Dimension | Weak (2) | Passable (3) | Strong (5) |
|---|---|---|---|
| Diagnosis | Rewrites the prompt | Looks at a few failures | Finds the common cause in the context |
| Fix | One prompt tweak | Better instruction | Instruction placement, code check and longer-term fix |
| Measurement | Spot checks | Spanish test set | Multilingual eval set with a deterministic grader |
| Trade-offs | None | Some | Speed of fix vs cleanliness, said explicitly |
Round scorecard: FDE: technical and build round, filled in for the mock candidate
| Dimension | Weak | Passable | Strong | The mock candidate |
|---|---|---|---|---|
| Clarifying | Starts coding immediately. | Asks a few questions. | Pins down the goal, inputs and what done means first. | Strong. Asked for failing examples before touching the prompt. |
| Approach | Unworkable or over-built. | Workable. | The simplest approach that works, stated before building. | Strong. Found the cause in the context (English documents), not the wording. |
| Testing | Tries one happy-path input. | Tries a few inputs. | Tests varied and bad inputs, and checks outputs systematically. | Passable. Built a test set but only of Spanish; added other languages when asked. |
| Trade-offs | None mentioned. | Some. | Says what was cut, why, and what comes next. | Strong. Explained the cost of translating documents vs a final check. |
How the answer changes by role
| Role | What to emphasise |
|---|---|
| Forward Deployed EngineerForward Deployed Engineer. An engineer embedded with customers who scopes, builds and ships AI solutions into production. Read the full explanation | Fast diagnosis on the customer's real conversations |
| AI Product Engineer | The code check and the eval in the build pipeline |
Common mistakes
- Adding "Always reply in Spanish!!!" and hoping
- Not reading failing examples first
- Relying on the model alone for a rule code can check
- Testing only the language that broke
More follow-ups to practise
- "The language check is wrong on short replies." Hint: short text is hard to detect; use the conversation's language instead.
- "Customers mix languages." Hint: decide a rule, then make it explicit.
- "Regeneration adds latency." Hint: how often it triggers, and the cost of a wrong-language reply.
Go deeper
- Module: Prompting and context engineering
- Framework: Explain a Concept Framework
- Framework: Opening Any Interview Answer
- Lesson: Context engineering
- Lesson: Improving prompts with evals
- Lesson: The parts of a good prompt
- Also tests: Evals foundations
- Also tests: Grading: code, judge, human
Sources
Representative question: written to match technical rounds for FDE and product engineer roles, not a specific reported interview.