Practice Quiz
A developer is building an interactive virtual assistant using direct API calls to Amazon Bedrock models. During testing, they find that the model is unable to recall the user's name or preferences from the immediately preceding prompt in the conversation. What is the cause of this behavior, and how can they resolve it?
If you access Amazon Bedrock models by using API calls, the models don't recall prior prompts and previous requests, unless the previous interaction is included within the current prompt.
Verified References
When utilizing Anthropic Claude models on Amazon Bedrock, what formatting practice is recommended when designing few-shot prompts to include demonstration examples without causing confusion with the delimiters for the overall prompt?
When using Anthropic Claude models, it's a good practice to use <example></example> tags to include demonstration examples, and to use different delimiters such as H: and A: in the examples to avoid confusion with the delimiters Human: and Assistant: for the whole prompt.
Verified References
According to the Amazon Bedrock prompt engineering documentation, which set of options can be used by an engineer to reduce hallucinations in model outputs?
To reduce hallucinations, you can refine your prompt using prompt optimization techniques; use techniques like Retrieval Augmented Generation (RAG) to provide the model access to more relevant data; or use a different model that might produce improved results.
Verified References
When designing prompts for Amazon Bedrock, how does few-shot prompting (in-context learning) differ from zero-shot prompting?
Few-shot prompting (in-context learning) involves providing paired example inputs and desired outputs (shots) to help LLMs better calibrate their output, whereas zero-shot prompting provides no example input-output pair in the prompt text.
Verified References
A software engineer is migrating an integration from using Titan Text models to Anthropic Claude models via Amazon Bedrock API calls. What formatting adjustment must the engineer apply to the prompts for the Anthropic Claude models that was not required for Titan Text?
If you are accessing Anthropic Claude models using API calls instead of the Amazon Bedrock text playground, you wrap your prompts in a conversational style to get the desired response, whereas this conversational style formatting is not necessary for the Titan Text and AI21 Labs Jurassic model families.
Verified References
To use conversational mode on an Amazon Bedrock Titan model, what specific prompt format can be used?
To use conversational mode on Titan, you can use the format of User: {{}} \n Bot: when prompting the model.
Verified References
A developer is building a chat assistant using Amazon Bedrock via API calls. During testing, they notice that the model fails to recall information provided in previous questions during the same conversation. Based on Amazon Bedrock design, how can the developer resolve this issue?
Amazon Bedrock models do not recall prior prompts or previous requests across API calls unless the previous context is explicitly included within the current prompt text.
Verified References
When designing prompt templates for use with Amazon Bedrock, how should double curly braces {{ and }} be utilized and handled?
Double curly braces {{ and }} are used in prompt templates to indicate placeholders for data-specific information and should be excluded from the final prompt text.
Verified References
Which of the following represents a valid set of strategies supported by Amazon Bedrock prompt engineering guidelines to reduce hallucinations in Large Language Models (LLMs)?
To reduce hallucinations in LLMs, users can refine prompts using prompt optimization techniques, utilize Retrieval Augmented Generation (RAG) to provide access to relevant data, or select a different model.
Verified References
An AI practitioner is constructing a prompt template for Anthropic Claude models on Amazon Bedrock. The prompt will contain few-shot demonstration examples. To ensure the model processes the prompt correctly without confusing the demonstration examples with the main prompt delimiters, what formatting practices should they follow?
For Anthropic Claude models, it is recommended to wrap demonstration examples within <example></example> tags and use delimiters like H: and A: inside them to avoid confusion with the main prompt's Human: and Assistant: delimiters.
Verified References
What is the key difference between zero-shot prompting and few-shot prompting (in-context learning) when interacting with Large Language Models (LLMs)?
Few-shot prompting, also known as in-context learning, provides paired example inputs and desired outputs (shots) to calibrate model expectations, whereas zero-shot prompting contains no examples.
Verified References
According to Amazon Bedrock prompt engineering guidelines, a single prompt to guide a model can be made up of several distinct components. Which of the following sets of components is described as being part of a single prompt?
A single prompt includes several components to guide a model, including a task or instruction, context of the task, demonstration examples, and the input text.
Verified References
A developer is writing a Python application that directly calls the Amazon Bedrock API to interact with an Anthropic Claude model. During testing, the API requests fail with a formatting error. Based on Claude API requirements, how should the prompts be structured?
Prompts sent to Anthropic Claude models via API must use a conversational style containing the specific delimiters '\\n\\nHuman:' and '\\n\\nAssistant:'.
Verified References
Ready to test your recall?
A developer is building an interactive virtual assistant using direct API calls to Amazon Bedrock models. During testing, they find that the model is unable to recall the user's name or preferences from the immediately preceding prompt in the conversation. What is the cause of this behavior, and how can they resolve it?
How confident are you in this answer?