Template Techniques
Progressive State Prompt Injection
Explains how to inject focused system instructions as an AI-assisted workflow moves between states.
A common technique on more complex business processes it to progresseively inject system prompts as the conversation progresses.
This is acheived in the Stubber Framework by injecting system prompts deterministically when certain actions are run OR when a state is entered.
This allows keeping the main system prompt high level and leaving detailed instructions for the state in which they will be needed.
It allows a token efficient way of building deterministic AI Agents
Detailed Example Structure
- A support conversational agent begins a conversation with a customer
- The agent runs an action called
verify_customerwith the customer identifier - This action transitions the stub state into "customer-support-in-progress"
- The "customer-support-in-progress" state has an "on-enter"
gpt_chat_tasktask - The task injects a system role message into the
mainchat to give the agent specific instructions about how to support the customer - This keeps the details of how support the customer out of the context until the customer has been verified