Back to list
Lv.2

Beam Search

Beam Search

A search algorithm that keeps only a handful of promising, top-scoring candidates as AI generates text.

In Simple Terms

Beam Search is a technique that lets AI keep only a handful of the highest-scoring options as it builds an answer, like a sentence, one step at a time. Checking every possible combination would take far too long, so this method narrows things down to just the most promising candidates to keep the computation manageable. It's used in machine translation, text summarization, and speech recognition models to help generate natural-sounding text.

Behind the Name

The name comes from combining "beam" (a narrow shaft of light) with "search." It's inspired by the image of shining a flashlight beam into the dark and following only the promising paths it illuminates, narrowing down the search as you go.

Take a Closer Look!

Beam Search is a search algorithm that AI uses when generating text or data. At each step, it keeps only a set number of the highest-scoring candidates from all the predicted options, narrowing things down as it goes.
Put simply, instead of trying out every possible option along the way, it moves forward by keeping only the most promising candidates.

When AI builds a sentence character by character, there are countless possible words that could come next. Calculating every single combination would take an enormous amount of time, so Beam Search always keeps a fixed number of the best candidates instead.
By re-selecting the highest-scoring combinations at each step, it skips unnecessary calculations and efficiently searches for the optimal answer.

This technique is widely used in machine translation, text summarization, and speech recognition systems.
While it doesn't guarantee a perfect, provably optimal result, its strength lies in the balance it offers: producing natural, high-accuracy results within a practical amount of time.