Before you can read the parent note, you need to be fluent in every squiggle it uses. This page builds each one from nothing, in the order that each depends on the last. If you have never seen ∼, argmax, or ∏ before — perfect, that is who this page is written for.
The key thing to hold onto: a language model does not return one fixed answer. It returns a spread of possibilities, each with a chance attached. That spread is what the symbols in the next sections describe.
Look at the figure. The orange bars are the model's guesses for what word comes next after "The Eiffel Tower is in ___". Each bar has a height = how likely the model thinks that word is. Tall bar = confident. That height is a probability, our next symbol.
You will use this idea everywhere in the parent note and in Tool Use in LLMs.
Why does ReAct need this? Because the model is a guesser, not an oracle. When the parent writes
PLM(thought∣Q,examples)
it is saying: "the model's chance of producing each possible thought, given the question and some examples." We are about to unpack that vertical bar ∣.
The figure shows one full turn of the loop as three coloured boxes. Blue = the model thinks, orange = it acts on a tool, green = the world observes back. The green arrow curls back up to a new blue box — that curl is ReAct. Everything else on this page is machinery for writing that curl down in symbols.
Why three parts and not two? The parent's whole argument is that pure thinking (blue only) can't touch the real world, and pure acting (orange only) can't correct itself. You need the green observation to close the loop.
means: the first thought is pulled at random from the model's spread of possible thoughts, weighted by how likely each is, given the question. It is not "equals" — the model could produce different thoughts on different runs, and that randomness is why Self-Consistency (running many times) even helps.
Read the figure left-to-right. Each tool in T gets a bar = how likely the model thinks that tool is the right next move. max points at the tallest bar's height. argmax points at the tool underneath it (here, Search) — and that tool is what we actually run. Putting it together:
a1 = the tool (from the box) that the model rates as most likely to be right, given the question and its first thought.
Why argmax and not sampling (∼) here? Because for actions we usually want the single best move, not a random one — a wrong tool call wastes a step. (Some systems sample actions too; the parent picks the confident-best version.)
The figure shows two trajectories. The top one ends on the correct A∗, so its indicator is 1 and its whole probability survives. The bottom one ends wrong, so the indicator zeroes it out (grey). "Maximise over τ" then means: find the run that is both likely and correct.
Related deeper topics once you're fluent here: Reflexion (adding self-critique to the loop), MRKL (routing questions to tools), and Self-Consistency (sampling many trajectories).