▶ Interactive Lab

Beam Search Tree

K parallel hypotheses expand and get pruned.

Advertisement
Each step: expand each beam by K candidates; keep top-K total.

What you're seeing

Beam search vs greedy: more chances to find best sequence; K× memory/compute.

★ KEY TAKEAWAY
Beam search keeps top-K hypotheses at each step. More thorough than greedy; slower; mostly used for translation and structured generation now.
▶ WHAT TO TRY
  • Click Expand step to see beams branch out.
  • Only top-K survive at each level.
  • Final answer: best-scoring complete sequence.