Skip to content

Bedrock Agent Runtime  >  Structures  >  PromptTemplate

PromptTemplate

Structure Class

PromptTemplate dataclass

Contains the template for the prompt that's sent to the model for response generation. For more information, see Knowledge base prompt templates.

This data type is used in the following API operations:

Attributes

text_prompt_template class-attribute instance-attribute
text_prompt_template: str | None = field(repr=False, default=None)

The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.

For more information, see the following resources: