Skip to content

Lesson 5 of 8 · 3 min read

Search over Trajectories

Search runs several candidate trajectories (samples, beams or a tree of partial plans) and selects among them with a verifier or value estimate. Best-of-N sampling, beam search, Tree of Thoughts (Yao et al., 2023) and Monte Carlo tree search over agent actions such as LATS (Zhou et al., 2023) are points on one spectrum. Gains depend on two numbers, how often at least one candidate is right and how reliably the judge finds it, and the cost grows with every branch. In agents, search is limited to steps without side effects, or to simulations and sandboxes, and latency budgets push it towards parallel, shallow search.

Premium lessonReviewed By the AIAgentInterviews editorial team
Get full Premium access · $25

All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.

6 months · One payment · No auto-renewal

Practise it as an interviewer asks it

Related lessons