Skip to content

    Beam Search

    Reading time: 2 min.Editorially reviewed on:

    Definition

    Heuristic search procedure that tracks only a limited number of currently most promising sub-candidates per search step.

    Beam Search extends several possible partial sequences in parallel, but discards all but the best k candidates after each step. The width k is called Beam Width. In language models, the method is used for sequence decoding, but is not guaranteed to be globally optimal.

    Simply explained

    The system does not follow every conceivable path, but only retains some of the currently best possibilities and expands them further.

    Why it matters in practice

    Relevant for text generation, translation, speech recognition and other sequence tasks. The choice of beam width influences quality and computing effort.

    Example from business

    Example scenario: A translation is generated by continuing only the five most likely previous set candidates after each token.

    Limits and pitfalls

    • Represent Beam Search as guaranteed optimal search; automatically equate larger Beam width with better text; ignore length bias and low diversity.

    Origin & history

    Beam Search is an established method for limited sequence search. Current Transformer libraries support it for text generation and also offer combinations with sampling.

    Use in mid-sized companies

    • Testing with proprietary generative model inference against sampling methods and jointly assessing quality, diversity, latency and costs.

    Frequently asked questions

    What is Beam Width?

    The number of candidates pursued further.

    Is Beam Search Sampling?

    Classic Beam Search selects deterministically; some implementations combine it with sampling.

    Does it reliably find the best sequence?

    No.

    Sources

    Source check: 10/09/2026. Definition and documented classification matched; examples describe possible applications.

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice