You can use placeholder variables in agent prompt templates. The variables will be populated by pre-existing configurations when the prompt template is called. Select a tab to see variables that you can use for each prompt template.
Variable | Models supported | Replaced by |
---|---|---|
$functions$ | Anthropic Claude Instant, Claude v2.0 | Action group API operations and knowledge bases configured for the agent. |
$tools$ | Anthropic Claude v2.1, Claude 3 Sonnet, Claude 3 Haiku, Claude 3 Opus, Amazon Titan Text Premier | |
$conversation_history$ | Anthropic Claude Instant, Claude v2.0, Claude v2.1 | Conversation history for the current session. |
$question$ | All | User input for the current InvokeAgent call
in the session. |
Using place holder variables to ask user for more information
You can use the following placeholder variables if you allow the agent to ask the user for more information by doing one of the following actions:
-
In the console, set in the User input in the agent details.
-
Set the
parentActionGroupSignature
toAMAZON.UserInput
with a CreateAgentActionGroup or UpdateAgentActionGroup request.
Variable | Models supported | Replaced by |
---|---|---|
$ask_user_missing_parameters$ | Anthropic Claude Instant, Claude v2.0 | Instructions for the model to ask the user to provide required missing information. |
$ask_user_missing_information$ | Anthropic Claude v2.1, Claude 3 Sonnet, Claude 3 Haiku, Claude 3 Opus | |
$ask_user_confirm_parameters$ | Anthropic Claude Instant, Anthropic Claude v2.0 | Instructions for the model to ask the user to confirm parameters that the agent hasn't yet received or is unsure of. |
$ask_user_function$ | Anthropic Claude Instant, Anthropic Claude v2.0 | A function to ask the user a question. |
$ask_user_function_format$ | Anthropic Claude Instant, Anthropic Claude v2.0 | The format of the function to ask the user a question. |
$ask_user_input_examples$ | Anthropic Claude Instant, Anthropic Claude v2.0 | Few-shot examples to inform the model how to predict when it should ask the user a question. |