A World Model Built from What Actually Happened
This chapter examines the part of Experiential that turns real traces into a bounded world model for evaluation. The specific question is how a finite record of agent behavior can help predict what might happen after a new action without allowing predictions to rewrite the evidence that grounds them. The reader should leave able to distinguish an observed transition from a generated observation, follow one grounded turn, and judge the leakage, text-only, and resource limits that keep this simulator from being mistaken for production replay.
What a real transition contains
A model response becomes especially informative when something happens after it. An assistant may send a message that prompts a user reply, or make a tool call that is followed by a tool result. Experiential calls this an action-to-observation transition. The action is what the agent did; the observation is a subsequent response from the user or environment. The pair captures a small causal unit that a later agent can use as a comparison: given a similar task, context, and action, what happened next in reality?
That definition excludes a tempting shortcut. A terminal assistant answer has no later observation in the trace, so it is not treated as a complete retrieval transition. The answer may be fluent or even judged successful, but it does not show how a user or environment responded to it. Including it as if it contained a consequence would blur the distinction between an action and its observed effect. The retrieval artifact is designed to answer a next-step question, and a next step that was never observed cannot answer that question.
The same rule applies to tools. Suppose an agent calls lookup_order with an order identifier. The useful transition is not merely the existence of the call. It includes the later tool result that the environment actually returned. If the source declares a tool-call identifier, Experiential uses it to pair the action and result. If the source declares no identifier, tool name and source order can provide a weaker fallback. The system does not pretend that a convenient matching rule has the same evidentiary strength as an explicit relationship.
The resulting index is read-only. It stores verified source references, transition identities, lineage assignments, an embedding snapshot, vectors, and hashes. The retrieval query describes the task, initial context, and candidate action; the observation remains the material returned by a matched real transition rather than part of the query used to find it. This distinction matters because the world model needs to retrieve consequences for a proposed action, not search by the consequence it is supposed to predict.
The index also remembers where each transition came from. A lineage can represent a trace or conversation family, and the evaluation setup can assign lineages to fit or held-out partitions. At query time, excluded lineages are removed before similarity scoring. Without that step, a test episode could retrieve a near-duplicate from its own conversation and appear to generalize when it had actually looked up its answer. Similarity is still only similarity; excluding a lineage reduces one form of leakage, but it does not prove that the remaining examples cover every behavior the agent may encounter.
This is why the index is more than a vector database in the ordinary sense. Its vectors are tied to exact transitions, and its transitions are tied to real-source manifests and lineages. A nearest neighbor is not allowed to float free of the evidence record that produced it. Conversely, a valid source transition is not upgraded into a universal rule merely because an embedding placed it near a new query.
From retrieval to a bounded prediction
A grounded world model uses this read-only index to produce a predicted observation. Operationally, it is a model that receives a task, initial context, the visible assistant action, and retrieved real transitions, then returns what a user or environment might say or do next. It is not replaying the original trace. It is using real examples to condition a new completion.
One turn follows a clear sequence. An evaluation agent proposes a text action. The grounded runtime constructs a retrieval query from the task, current context, and action, and the fit-only retriever returns eligible real transitions. The world-model provider receives the grounded prompt and generates a predicted observation. The runtime parses that result as a transition, records whether the episode is terminal, and appends the predicted user message to the in-memory transcript. The predicted message can then become the input to the next step of the simulated episode.
The separation between candidate and world-model clients is important. The candidate is the model or agent behavior being evaluated; the world model supplies the simulated environment response. If the same client or mutable state silently served both roles, a favorable result could reflect shared adaptation rather than a meaningful comparison. Experiential therefore binds independent candidate and world-model clients and records their economics separately. Candidate completion cost, world-model cost, retrieval embedding cost, and orchestration cost are not collapsed into one unexplained number.
The evaluation simulator also uses fit-only grounding. Held-out evidence has a later role in router reporting; it is not casually mixed into the retrieval material used to generate simulated experience. This does not make the world model unbiased. It makes the source of its examples explicit and keeps the simulated environment from seeing evidence it should not have at that phase.
A public world-model session adds resource bounds because a prediction loop can otherwise become an unbounded conversation. The session has an opaque identity, a limit on active sessions, an expiry time, maximum task and context sizes, a message-count ceiling, and transcript and observation byte limits. A step accepts a nonempty assistant text message and returns an OpenAI-shaped user message plus a terminal flag. The transcript is retained only in memory for that bounded session; ending or expiring the session removes it.
These limits are not incidental implementation details. They define what the public runtime claims to support. The world model is a bounded text session, not a general-purpose emulator of every modality an agent may use. Tool calls, function calls, audio, non-text content, and non-assistant actions are rejected before retrieval or provider dispatch in the public session path. The text evaluation simulator is stricter still: a task that declares tools becomes a structured unsupported failure rather than a silently simplified tool episode.
That failure behavior protects interpretation. If a tool task were converted into a text-only task without being labeled, a candidate could appear to succeed in an environment it never actually had to operate. Recording the unsupported case preserves the fact that the simulated coverage did not include that task shape. A bounded failure is more informative than a fluent but invalid substitute.
Generated rollouts are nevertheless valuable, so Experiential persists one immutable rollout per selected evaluation cell. The rollout can contain the candidate action, predicted observations, stop reason, structured failure, and separated economics. It can be resumed or checked against the exact plan, task set, fit retrieval input, model snapshots, and simulation specification. Persistence makes a comparison reproducible; it does not make the rollout a new real observation.
That last distinction is the most important safeguard in this chapter. If generated predictions were fed back into the read-only retrieval index, the world model could retrieve its own earlier guesses on later turns. An error would then look like a precedent, and repeated simulation could amplify the model's assumptions while appearing increasingly “grounded.” Experiential blocks that path: the retrieval index accepts verified real trace evidence, while rollouts remain evaluation artifacts. The simulator can learn from observed behavior without manufacturing additional observations for its own grounding source.
The retrieval mechanism has its own identity constraints. The index records the embedder model and capability snapshot as part of the artifact, and the vectors are tied to transition IDs rather than stored as anonymous numerical neighbors. A deterministic local embedder is the default provider-free option; a semantic embedder is allowed only when an explicit client and exact model snapshot can be supplied again when the artifact is loaded. That requirement prevents a later runtime from quietly using a different embedding space and interpreting changed similarity scores as if they came from the original index.
The query-side exclusion is equally important. Suppose a conversation contains several assistant actions and environment responses, and one of its later turns is being evaluated. A simple nearest-neighbor lookup could return an earlier transition from that same lineage because it looks highly similar. Experiential removes excluded lineages before scoring, so the evaluation cannot use its own conversation as a hidden answer key. This is not a complete anti-leakage theorem: related tasks can still exist across lineages, and an embedding can still retrieve an unhelpful example. It is a concrete boundary that addresses one identifiable failure mode without pretending to solve all distributional overlap.
A world-model session then turns the retrieved evidence into state. It begins with a task and optional initial context, gives the session an opaque identity, and keeps the transcript in a bounded in-memory record. Each accepted assistant action is appended, the predicted user or environment message is appended after it, and the session's expiry is refreshed. If the prediction is terminal, the session closes; if it exceeds a task, observation, message-count, or transcript limit, the step fails instead of silently truncating the state. Ending a session removes the transcript immediately. These choices make the public runtime's lifecycle explicit: it is a limited experiment with a clear beginning and end, not an unbounded shared memory.
The evaluation path adds another layer of control around paid work. Before a cell dispatches, the simulator validates that the plan, task set, fit-only retrieval input, world-model artifact, model snapshots, prompt version, and candidate bindings agree. It can resume completed cells from immutable rollout artifacts, while a retryable dispatch failure can be treated as a fresh attempt under the remaining budget. A cell that declares tools is retained as an unsupported failure rather than being forced through a text-only loop. The result is less glamorous than a fully general simulator, but more honest about which cases were actually evaluated.
That honesty is also why economics are separated. A candidate completion can cost one amount, the world-model completion another, and retrieval embedding or orchestration can add their own operations. A single “simulation cost” number may be useful for a ceiling, but the persisted rollout keeps the components distinguishable. If a run reaches its finite ceiling, the next cell can be recorded as a structured budget failure rather than omitted from the denominator. Evidence about what was not dispatched is then part of the result instead of an unexplained hole.
Where the simulation stops
The boundary is not only about provenance. It is also about what the system can claim from a simulated result. A world-model response is a prediction conditioned by a model, a prompt, an embedding, a fit-only retrieval set, and bounded session state. If the retrieved examples are sparse or unrepresentative, the prediction may be weak even when every artifact is internally valid. Retrieval lineage exclusion prevents a particular leak; it does not establish semantic coverage or guarantee that the nearest examples are the right examples.
The repository's deterministic comparison evidence illustrates the same restraint. It compares a text simulator with a bounded local-process environment and retains a malformed sandbox response in the denominator rather than dropping it. The reported conclusion is structural terminal agreement, not a judgment that the simulator matches task quality or that a cloud environment behaves the same way. The evidence is useful for checking lifecycle and failure handling, but it is not a live-provider quality study.
The release scope draws the boundary wider still. Provider matrix cells that require credentials are marked as not run, and the release makes no universal claim about hosted availability, account limits, billing, or service-specific behavior. A grounded simulation can help Experiential compare candidate behavior under a repeatable recipe, but it cannot turn a deterministic injected run into proof that a provider will respond the same way for every account or workload.
The right mental model is therefore neither “the world model is fake” nor “the world model is production.” It is a controlled instrument between those extremes. Real transitions give it a bounded memory of observed consequences. Retrieval and lineage rules constrain what it may consult. Session and content limits constrain what it may simulate. Immutable rollouts preserve what the experiment actually did. The resulting evidence can support a comparison, provided the comparison names its conditions and does not silently promote prediction to observation.
The next step is to combine these distinctions into a practical evidence ladder. The project now has several artifacts that look like data but answer different questions: imported observations, grounded predictions, judgments, and release measurements. Before any router is fitted, the reader needs a rule for keeping those categories separate and for understanding what each can legitimately support.