AWS Certified Generative AI Developer - Professional (AIP-C01) free question 7 / 10 · Domain 1: Foundation Model Integration, Data Management, and Compliance
A team builds a reusable chat prompt in Amazon Bedrock Prompt management for a model that supports the Converse API. For each test, the prompt should carry the earlier user messages and the earlier replies of the model for the model to consider when it answers the final user message. What should the team add to the prompt?
- A prompt caching setting that stores the earlier messages in place of the conversation
- The previous user messages and model responses, included as conversational history for the model
- Tools for the model to use when it generates the response, if the model supports them
- A higher maxTokens value in the inference configuration, so the earlier messages fit in the prompt
Show the answer and explanation
Answer: B
Why this is correct
When the model chosen for a prompt supports the Converse API, the prompt can include a system prompt, previous prompts (user messages) and model responses (assistant messages) as conversational history for the model to consider when generating a response for the final user message, and, for models that support them, tools and prompt caching. The earlier user messages and replies of the team's chat prompt are that conversational history. Tools are for the model to use, maxTokens limits the generated response, and prompt caching is a cost feature.
Why the other options are wrong
"Tools for the model to use when it generates the response, if the model supports them" … Tools are items that the model can use when generating the response, and they are included if the model supports them. They do not carry the earlier messages of the conversation.
"A higher maxTokens value in the inference configuration, so the earlier messages fit in the prompt" … maxTokens is the maximum number of tokens to allow in the generated response. It limits the output of the model and does not supply earlier messages as input.
"A prompt caching setting that stores the earlier messages in place of the conversation" … Prompt caching reduces costs by caching large or frequently used prompts, if the model supports it. It does not replace the conversational history that the page lists as a separate item.
Key points
A prompt in Prompt management can include previous user messages and model responses as conversational history when the model supports the Converse API.