AI Glossary Term
What does “Beam Search” mean?
Definition
A decoding algorithm that keeps the top several candidate sequences at each step to find higher-probability outputs.
How Beam Search works
Example
With a beam width of 3, the decoder keeps the three best partial sentences at each step instead of committing to one word at a time, then returns the highest-scoring full sentence.
Why it matters
It often finds higher-probability sequences than greedy decoding. It tends to produce repetitive, less natural text in open-ended chat, so it is more common in translation.
Common questions
What is beam width?
The number of candidate sequences kept at each step.
Beam search vs sampling?
Beam search is deterministic and seeks likely sequences. Sampling adds randomness for variety.
Does it cost more?
Yes, roughly in proportion to the beam width.