Case Study

Diagnosing an Incorrect Text Completion from Search Scoring

Case context: You are building a text-completion inference system. For a given prompt P, the system outputs completion C_out, and that completion is wrong. The correct completion is C_star. The decoder uses beam search to approximate the completion C that maximizes Score_P(C). To investigate the failure, you evaluate both candidates and find that Score_P(C_star) is higher than Score_P(C_out), yet the decoder still returned C_out.

Question: Given this score comparison, decide whether the failure comes from the search procedure or from the scoring model, and state which part you should improve first.

Sample answer: Because Score_P(C_star) is greater than Score_P(C_out), the scoring model gives the true completion the better score. The system still returned C_out, so the problem is that beam search did not find the best-scoring completion. That makes this a search failure, not a scoring-model failure. The best next step is to improve the search procedure rather than retraining the scoring model.

Key points:

  • The higher score for C_star shows that the scoring model preferred the correct completion.
  • Returning C_out anyway means the decoder missed the best option, which points to a search problem.
  • The priority should be to strengthen the search procedure, not the model that assigns scores.

Rubric: The response must identify the issue as a search problem because the correct completion had the higher score but was not chosen. It must also say that the search procedure should be improved before changing the scoring model.

0

1

Updated 2026-08-12

Contributors are:

Who are from:

Tags

Machine Learning

Deep Learning

Supervised Learning

Dive into Deep Learning @ D2L

Data Science

Machine Learning Strategy

Machine Learning Yearning @ DeepLearning.AI