The language model as a policy
Tokens and turns, prompting as conditioning, temperature, the cloning prior, and gaps before a good agent.
A prior, not randomness
Model-based RL (previous note) still started from a blank policy and improved it over huge numbers of episodes. A language model arrives with a prior: after pretraining and instruction tuning it already puts mass on plausible next moves. With a GPT-2 vocabulary, strings of length 8; a uniform policy never finds search[Dunmore]. Key idea. An LM is already a stochastic policy . Write history into the context, parse a span of the generation as an action, and you have the agent function of What an agent is.
Tokens and turns
Two levels. Turn level: a POMDP — observation is text, action is a string mapped by a parser to or invalid, with
Token level: each next token is an action, the prefix is the state, reward arrives at the end — the MDP used when training LMs with RL. The context stands in for a belief; the window is the limit (Context and memory).
Prompting as conditioning
Changing the prompt changes without changing . The system prompt states the task; few-shot demos select a latent behaviour (after examples with likelihood ratio , hits , , ); the chat template separates roles — and observations can inject instructions (Agent security). In the vacuum toy, one extra sentence about waiting raises score from to by selecting a different agent program.
Temperature
Temperature divides logits: . Low is nearly deterministic but can loop; is for diverse samples; high inflates the invalid tail. With logits Right , NoOp , Suck , Left and junk tokens at , invalid mass is at and at . Temperature is still not bitwise deterministic on a shared GPU batch.
The cloning prior
Pretraining is behaviour cloning of writers; instruction tuning clones an assistant (including tool calls). The KL-regularized optimum reweights the prior: . With , rewards , , one gets — unreachable actions stay at zero. Free-form plans can read well yet fail grounding (VirtualHome: executable before mapping to admissible actions).
What is still missing
Still missing for a good agent: grounding (schemas, constrained decoding, SayCan-style affordances), feedback (observe results in context or train on rewards), and memory beyond the window. Inside the policy, hard reasoning needs room to write intermediate tokens — next: chain of thought.
Check your understanding
The same questions as in Pulse. Answers are shared between modes.
Answers are saved on the server and tied to this browser until you sign in.