This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::Bedrock::Agent PromptConfiguration
Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "AdditionalModelRequestFields" :Json, "BasePromptTemplate" :String, "FoundationModel" :String, "InferenceConfiguration" :InferenceConfiguration, "ParserMode" :String, "PromptCreationMode" :String, "PromptState" :String, "PromptType" :String}
YAML
AdditionalModelRequestFields:JsonBasePromptTemplate:StringFoundationModel:StringInferenceConfiguration:InferenceConfigurationParserMode:StringPromptCreationMode:StringPromptState:StringPromptType:String
Properties
AdditionalModelRequestFields-
If the Converse or ConverseStream operations support the model,
additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield.For more information, see Inference request parameters and response fields for foundation models.
Required: No
Type: Json
Update requires: No interruption
BasePromptTemplate-
Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates.
Required: No
Type: String
Minimum:
1Maximum:
100000Update requires: No interruption
FoundationModel-
The agent's foundation model.
Required: No
Type: String
Pattern:
^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}(([:][a-z0-9-]{1,63}){0,2})?/[a-z0-9]{12})|(:foundation-model/([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}))|([0-9]{12}:(inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+))|(([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.]?[a-z0-9-]{1,63})([:][a-z0-9-]{1,63}){0,2}))|(([0-9a-zA-Z][_-]?)+)$Minimum:
1Maximum:
2048Update requires: No interruption
InferenceConfiguration-
Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the
promptType. For more information, see Inference parameters for foundation models.Required: No
Type: InferenceConfiguration
Update requires: No interruption
ParserMode-
Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the
promptType. If you set the field asOVERRIDDEN, theoverrideLambdafield in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.Required: No
Type: String
Allowed values:
DEFAULT | OVERRIDDENUpdate requires: No interruption
PromptCreationMode-
Specifies whether to override the default prompt template for this
promptType. Set this value toOVERRIDDENto use the prompt that you provide in thebasePromptTemplate. If you leave it asDEFAULT, the agent uses a default prompt template.Required: No
Type: String
Allowed values:
DEFAULT | OVERRIDDENUpdate requires: No interruption
PromptState-
Specifies whether to allow the inline agent to carry out the step specified in the
promptType. If you set this value toDISABLED, the agent skips that step. The default state for eachpromptTypeis as follows.-
PRE_PROCESSING–ENABLED -
ORCHESTRATION–ENABLED -
KNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLED -
POST_PROCESSING–DISABLED
Required: No
Type: String
Allowed values:
ENABLED | DISABLEDUpdate requires: No interruption
-
PromptType-
The step in the agent sequence that this prompt configuration applies to.
Required: No
Type: String
Allowed values:
PRE_PROCESSING | ORCHESTRATION | POST_PROCESSING | ROUTING_CLASSIFIER | MEMORY_SUMMARIZATION | KNOWLEDGE_BASE_RESPONSE_GENERATIONUpdate requires: No interruption