Template Techniques
Split-Brain Process
Explains how separate LLM contexts can divide responsibilities and reduce prompt-injection and persuasion risks.
Some processes require that a different LLM context process different parts of the process to ensure that prompt injection and persuasion techniques do not work.
A strategy that can then be used is to split the functions on the template between two chats having independent system prompts.
A conversational agent could pass details that require checking to a supervisor agent for example and then continue once the supervisor has given the go ahead.
Detailed Example Structure
- A conversational agent is interacting with a user using the chat name
main - In one of the states there is an action called
submit_for_approvalwhich takes discrete fields for data used by the supervisor agent - The
submit_for_approvalaction starts up a new chat calledapprovalwith a system prompt for the supervisor - The fields data gets substituted into the prompt for the supervisor
- The action moves the process into a state called "approval-pending"
- There are two AI enabled actions with the
allowed_chat_namesset only to theapprovalchat - The two actions are
approveandreject - The
approveaction moves the state to "approved" and has agpt_chat_taskthat injects a system role message into themainchat to notify of the successful approval - The
rejectaction moves the state back to the previous state and also injects the reject reason - Both the
approveandrejectactions will havedisabled_dynamic_tasksset to true, as theapprovalchat agent won't need any feedback after calling approve or reject