AI Glossary / Natural language and speech / Intermediate

n-best list

Definition

An n-best list is a ranked collection of up to n candidate outputs retained by a system, such as alternative speech transcripts or translations. “Best” refers to the system's scoring and search procedure, not a guarantee that the candidates are correct or globally optimal.

What it means

A speech recognizer may hear an uncertain phrase and keep several complete transcripts instead of committing immediately to one. A later component can compare those alternatives with additional information, or a user interface can offer a small choice when clarification is useful.

The letter n specifies a list size, such as five or ten candidates. It does not describe an n-gram length, the number of words in each candidate, or necessarily the width of the search beam used to generate the list.

A list preserves some uncertainty, but only within its retained alternatives. If the correct name or sentence is absent, selecting among existing candidates cannot recover it. Producing more candidates can help coverage, but can also add near-duplicates without meaningful diversity.

How it works

A decoder searches possible outputs and retains candidates according to a score. Beam search is one common approximate method. Finished hypotheses may be collected, deduplicated, ranked, and truncated to the requested number. Exact top-n guarantees require an appropriate search algorithm and assumptions; they do not follow from the list's name.

A second-stage model may rescore the list using additional language or task information. In speech recognition, scores can combine the recognizer's evidence with an external language model and length-related terms. The combination must be specified and tuned rather than assumed to be a calibrated probability.

Rescoring changes the ordering of available hypotheses. It differs from generating new candidates, and it should not be confused with aggregating a posterior over every possible output.

Three practical examples

  • Dictation: retain alternative spellings of a spoken name so a reviewer can select the appropriate one.
  • Translation: compare several complete translations with a terminology or quality model before choosing an output.
  • Voice search: use candidate transcripts to retrieve likely titles, while asking for clarification when alternatives refer to materially different items.

Think of it this way

Think of an n-best list as a shortlist prepared for a second review. The reviewer can reorder its members but cannot choose an omitted option without reopening the search. The analogy is limited because candidates come from a computational scoring process and may be highly similar or share the same systematic mistake.

Worked example

Suppose a recognizer retains three hypothetical candidates with initial scores: A, “send the blue file,” score −2.0; B, “send the new file,” score −2.2; and C, “send the blue tile,” score −2.8. Higher scores are better, so A initially ranks first.

A second model assigns additional scores of −1.4, −0.2, and −1.0 respectively. Use the illustrative rule final score = initial score + 0.5 × additional score. The final values are A: −2.7; B: −2.3; C: −3.3. B becomes first even though it was second originally.

These numbers are arbitrary teaching scores, not calibrated probabilities. If the speaker actually said “send the blue folder,” no reordering of this three-item list can produce that exact transcript. For that outcome, the system must generate additional candidates, revise the input interpretation, or obtain clarification.

Illustrative case study

Fictional case: Slate Voice searches an internal catalog from spoken requests. Its top transcript frequently uses a common word where the catalog contains an uncommon product name. The team tests retaining several hypotheses and rescoring them against catalog evidence.

Reviewers also inspect examples where the product name never appears in the list. Those failures require attention to candidate generation rather than a more elaborate reranker. The case illustrates how separating the two stages directs debugging; it does not claim a measured accuracy increase.

Common misconceptions and mistakes

An n-best list is not a confidence interval and does not ensure coverage of the correct answer. Its scores may be unnormalized, length-adjusted, or combined from several models. Softmax over the retained list produces a distribution over that list, not automatically the true posterior over all outputs.

Do not assume beam width equals the final number of distinct candidates. Search pruning, duplicate outputs, and termination rules can affect what remains. Likewise, ten almost-identical alternatives may offer less useful choice than a smaller but more varied list.

Business use

Evaluate candidate generation and selection separately. In speech recognition, an oracle analysis can choose the lowest-error candidate using the reference transcript, revealing the best result available within the list. This is an evaluation aid, not a deployable method that knows the correct answer in advance.

Record list size, search settings, deduplication, scoring terms, latency, and the final selection method. Compare the operational value of alternatives with their processing and review cost. When uncertainty changes a requested action, an explicit clarification can be more useful than silently choosing the highest-ranked hypothesis.

People also ask

Does increasing n guarantee a better final answer?

No. It may improve available coverage, but selection can still be wrong, and search settings may change the candidates.

Is the first item always the most probable sentence?

Only relative to the stated scoring and search conditions. Approximate search and modified scores can prevent that interpretation.

Can an n-best list contain translations as well as transcripts?

Yes. The concept applies to ranked candidate outputs in multiple language-processing tasks.

Check your understanding

A reranker perfectly chooses the best item in its list, but the intended transcript was never generated. Can reranking alone return that omitted transcript?

Answer: No. A selector restricted to the list cannot output an absent candidate. Candidate generation or the permitted output process must change.

Related terms

  • Beam search
  • Decoding
  • Word error rate
  • Candidate generation
  • reranking
  • rescoring
  • lattice
  • minimum Bayes risk decoding

Learn next

build a tiny list, rescore it with an explicit formula, and distinguish ranking changes from new candidate creation. Then compare an n-best list with a lattice, which compactly represents many alternative paths rather than simply listing a small number of finished sentences.

More in Natural language and speech

  • Multi-document summarization - Multi-document summarization is the task of producing a concise account from information in several source documents.
  • Multilingual notation - Multilingual notation, in the lexical-resource sense used here, is a way of representing correspondences among lexical information in different languages.
  • Multiword expressions - Multiword expressions are combinations of words with conventional lexical, grammatical, or meaning properties that require treatment beyond an unrestricted...
  • Naive semantics - Naive semantics is an approach to lexical meaning that associates word senses with everyday conceptual knowledge about the objects or events they describe.
  • Named entity recognition - Named entity recognition, or NER, identifies spans of text that belong to specified entity categories and assigns a type to each span.
  • Nasal sound - A nasal sound is a speech sound produced with airflow through the nasal cavity because the velum, or soft palate, is lowered.

Sources

Sources: Jurafsky and Martin, Speech and Language Processing, Chapter 16, n-best hypotheses and speech-recognition rescoring: https://web.stanford.edu/~jurafsky/slp3/16.pdf . Kumar and Byrne (2004), Minimum Bayes-Risk Decoding for Statistical Machine Translation, finite candidate sets and decoding context: https://aclanthology.org/N04-1022.pdf . The score calculation and Slate Voice case are original illustrations.

Previous: Mutually utility independent Next: N-gram

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer