Beam Search
What is Beam Search?
In one sentence: Beam search keeps several possible sentences going at once and picks the one with the best overall score at the end.
Instead of choosing one word at a time like greedy decoding, it keeps the top few "beams," or partial answers, and extends each. This finds better overall sequences for tasks like translation.
What does Beam Search look like?
With a beam width of 3, the model tracks the 3 most promising translations at each step.
Why does Beam Search matter?
It is common in translation and speech recognition, though chatbots usually use sampling.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/beam-search/">Beam Search, explained simply</a> (The AI Math Dictionary)