Calibrate Confidence Scores for Automated Metadata Extraction

Last updated: November 29, 2026

Quick Overview

A model extracts fields such as contract value and renewal date from documents and returns a confidence per field. Explain how you would check whether those confidences are calibrated, fix them if not, and choose thresholds for auto-filling Box metadata versus sending to human review.

Box
Machine Learning
Machine Learning Engineer
Box
November 29, 2026
Machine Learning Engineer
Onsite
Machine Learning
Medium

0

0

0 solved


A model extracts fields such as contract value and renewal date from documents and returns a confidence per field. Explain how you would check whether those confidences are calibrated, fix them if not, and choose thresholds for auto-filling Box metadata versus sending to human review.

Box extracts structured metadata from contracts, invoices, and forms and exposes confidence scores so customers can automate only the fields they trust. An onsite ML round checks whether you understand calibration as distinct from accuracy, can apply a post-hoc fix, and can tie thresholds to the business cost of a wrong value.

What the Interviewer Expects
  • Defines calibration and how to measure it (reliability diagram, expected calibration error)
  • Builds a labeled holdout by field type and document type
  • Applies post-hoc calibration such as temperature scaling or isotonic regression on a separate split
  • Chooses thresholds from precision targets or error costs per field
  • Recognizes that LLM token probabilities are often poorly calibrated
  • Plans monitoring for drift with new document templates
Key Topics to Cover
Probability calibration
Expected calibration error
Isotonic regression
Threshold selection
Human in the loop
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • Why might a field like a date be calibrated while a free-text field is not?
  • How would you get confidences at all if the model is a hosted LLM with no logprobs?
  • A customer wants 99% precision on invoice totals. How do you set and verify the threshold?
  • How do human review corrections feed back into the system?
Sharpen Your Skills on Codemia

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

Explore ML Interview Prep
Sample Answer
Clarify

Each prediction is (document, field, value, confidence p). A value is correct if it matches a normalized gold value (dates parsed, currency amounts compared numerically). Calibrated means: among predi...

Approach

Label a stratified holdout across field types, document types, and languages. Plot a reliability diagram: bin predictions by p and compare mean p to observed accuracy. Summarize with $\text{ECE} = \su...


Submit Your Answer
Markdown supported

Related Questions