Each interaction with generative AI happens within a state. The state is the AI’s list of knowns and assumptions that influence everything from the format and tone of your responses to the accuracy of code over a long build. This is the current environment from which the AI is working. This series looks at what makes up that state and how controlling it can make AI interactions more relevant, predictable and reliable.
Context engineering is a common term for deliberately managing what information reaches a model. State, as used in this article, is a broader concept that also considers persistence, inferred information, constraints, changing environments and the effects they have on results.
The manifestations are easily identifiable. Once you use AI even at the chat level, you will notice that different windows respond to you in different ways. Direct commands about responses, if repeated or identified as important, will become part of the AI’s state in the current window. If you instruct it to provide short answers, in bullet form, with a single sentence summary, the AI will not only reply in the next response that way, but often start including it in other future responses.
State is also where the different conversational modes appear. Exploratory conversations, minimal response coding, skeptical legal review, etc. The longer the interaction continues to produce consistent types of answers, the more established the pattern becomes in the state.
The more precisely you control state, the more predictable the output.
AI has assumptions and programming to intentionally define and restrict state. Guardrails, permissions, conversational formats, etc. Some rules are outside the user’s control. Others involve knowledge and assumptions that are changeable, or more importantly, controllable.
Controlling state influences the type and the quality of the output. The more precisely you control state, the more predictable the output. There are multiple ways to control state, and used together they can create a cohesive and repeatable foundation for interactions. Prompts have a direct effect on current output and output over time, documents can provide a stable knowledge foundation, loops can repeatedly update state, RAG can retrieve relevant information, and APIs and integrations can provide real-time data to the state.
All of these elements can contribute to constructing and controlling the state, not just what to include but, just as important, what to exclude.
This article series explores how the state concept can be applied to generative interactions as a foundational way to keep large, multi-faceted AI projects “on the same page.” From well structured prompts to living .md files, state control techniques are common. While this series strives to present “state” as a practical concept to improve AI use, it also attempts to use state to explain some of the logic behind seemingly illogical output.