Evaluate Code Completion Quality Offline and Online for Copilot
Last updated: November 29, 2026
Quick Overview
A team has a new code completion model for GitHub Copilot. Describe how you would evaluate it before and after launch, which metrics you would trust, and how you would decide whether to ship it.
Microsoft
November 29, 20260
0
0 solved
A team has a new code completion model for GitHub Copilot. Describe how you would evaluate it before and after launch, which metrics you would trust, and how you would decide whether to ship it.
Evaluating generative models is a recurring theme in Microsoft ML interviews, especially for Copilot products where user value is measured in accepted and retained code rather than benchmark scores. The interviewer checks whether you connect offline proxies like pass@k to online signals like acceptance and retention, and whether you design an experiment that respects latency and noise.
What the Interviewer Expects
- Defines offline metrics: functional correctness (pass@k on held-out tasks), exact and edit-similarity match on real repos
- Avoids contamination by using repos and dates outside the training data
- Defines online metrics: acceptance rate, characters retained after N minutes, latency, suggestions shown
- Designs a randomized experiment at the user level with guardrails
- Accounts for the interaction between latency and acceptance
- Plans segment analysis by language and user experience
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- The new model has higher acceptance but users delete more of the accepted code later: what do you conclude?
- How do you compute pass@k without bias from n samples per problem?
- How would you detect that the offline benchmark leaked into training data?
- The new model is 40 ms slower: how would you separate quality gains from latency losses?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
What changed: model size, training data, context assembly? Is the goal more accepted code, faster coding, or fewer errors? Which languages and editors are in scope? Is the latency budget fixed? The an...
Approach
Offline, build two suites. A functional suite of held-out programming tasks with unit tests, scored by pass@k. A realistic suite of completion points sampled from recent public repositories created af...
Submit Your Answer
Microsoft Machine Learning Engineer Interview Guide
Interview process, tips, and preparation timeline