Beam search is an algorithm used in many natural language processing tasks. It is a heuristic search algorithm that explores a graph by expanding the most promising node in a limited set. Beam search is an optimization of best-first search that reduces its memory requirements. It is called "beam search" because it is likened to a beam of a fixed width in the search space. X beam search