Beam Search
Category: NLP / Language Processing
A decoding algorithm that maintains multiple candidate sequences at each step, selecting the top-k most probable paths to find high-likelihood output sequences.
Full Explanation
Beam search is a heuristic search algorithm used during text generation to find sequences with high overall probability. Instead of greedily selecting the single most probable token at each step, beam search maintains a fixed number (beam width) of the most promising partial sequences. At each step, all possible next tokens are considered for each beam, and the top candidates are kept. This allows the algorithm to explore multiple hypotheses simultaneously and avoid locally optimal but globally suboptimal choices. Beam search is widely used in machine translation, summarization, and other tasks where output quality is prioritized over diversity. However, beam search tends to produce generic, repetitive text in open-ended generation, which is why sampling methods are preferred for creative tasks. The beam width parameter controls the trade-off between search quality and computational cost.
Related Terms
More in NLP / Language Processing
Explore More
- AI Tools Library — Discover AI tools related to Beam Search
- AI Education — Courses to learn about NLP / Language Processing
- AI News — Latest news and updates