Beam Search
The short answer · 17 words
In short
Heuristic search procedure that tracks only a limited number of currently most promising sub-candidates per search step.
Flow-alerta.cab (2026): Beam Search. https://flow-alerta.cab/en/glossar/beam-search. Editorially reviewed on: 09 October 2026.
How much detail would you like?
Practical
Relevant for text generation, translation, speech recognition and other sequence tasks. The choice of beam width influences quality and computing effort.
Example scenario: A translation is generated by continuing only the five most likely previous set candidates after each token.
Testing with proprietary generative model inference against sampling methods and jointly assessing quality, diversity, latency and costs.
At a glance
- Core
- 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.
- Use
- Relevant for text generation, translation, speech recognition and other sequence tasks. The choice of beam width influences quality and computing effort.
- Example
- Example scenario: A translation is generated by continuing only the five most likely previous set candidates after each token.
- Limits
- Represent Beam Search as guaranteed optimal search; automatically equate larger Beam width with better text; ignore length bias and low diversity.
Questions about this term
What is Beam Width? The number of follow-up candidates. Is Beam Search sampling? Classic beam search chooses deterministically; some implementations combine it with sampling. Surely it finds the best sequence? No.
All details and background
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.
ELI5 – Explained simply
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
Example scenario: A translation is generated by continuing only the five most likely previous set candidates after each token.
Pitfalls and limits
- 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.
Related terms
- Greedy Decoding
- Sampling
- Top-k
- Top-p
- Decoding
Matching Flow-alerta service
AI adoption & supportAI implementation & support: clarify usage guidelines, limits, responsibilities and escalation paths.Matching tool / use case
View use casesUse Case: controlled sequence decoding during translation or text generation.Sources
- huggingface.coHugging Face Transformers, Generation strategies – Beam search
Quellenprüfung: 09.10.2026. Definition und dokumentierte Einordnung abgeglichen; Beispiele beschreiben mögliche Anwendungen.
Editorially reviewed on: