Context Construction From Live Twin State
Assembling a copilot's working context from the live twin state vector, retrieval, and task framing under a strict token and latency budget.
The context is the copilot's world
A copilot reasons only over what is in its context. Kronos assembles that context deliberately for each request from three sources: the live twin state vector (the current estimated machine and plasma state), retrieved evidence from L2, and the task framing (role, constraints, and the specific question). Getting this assembly right is as important as the model itself.
What goes in, in priority order
- System framing: copilot role, machine, hard constraints, refusal rules
- Live twin state: operating point, margins, active anomalies, confidence
- Retrieved evidence: top structured facts and reranked document chunks
- Task: the operator's question and any prior turns in the session
The live twin state is summarized, not dumped. The full state vector is large; the context carries the operating point, the distances to envelope boundaries, active advisories, and the twin's confidence, each with a pointer back to the full state for the copilot to query via a tool if it needs detail. This keeps the context focused and within budget while preserving access to depth.
build_context(request, twin, budget):
ctx = system_framing(request.copilot, request.machine)
ctx += summarize(twin.state(), fields=['op_point','margins',
'anomalies','confidence'])
ctx += rag.retrieve(request, budget=budget.retrieval)
ctx += request.question + recent_turns
assert tokens(ctx) <= budget.context
return ctx
Freshness and consistency
Twin state in the context is timestamped and must be fresh; a copilot advising on disruption margin cannot reason over stale state. If the twin state is older than a threshold the context builder refuses and requests a refresh rather than presenting stale numbers as current. State drawn from the twin is internally consistent because it comes from one coherent estimate, not from independently sampled sensors.
Context construction is where the copilot meets the live machine. Its budgeting is covered in context-window budgeting, its prompt templates in prompt construction, and the retrieval half in RAG over the fabric. The freshness contract ties directly to the latency boundary.