AIF-C01 Applications of Foundation Models Practice Question
Exhibit
Refer to the exhibit.
{
"modelId": "anthropic.claude-v2",
"contentType": "application/json",
"accept": "application/json",
"body": {
"prompt": "Human: Summarize the following text in 50 words. Text: AWS is a cloud platform. Response:",
"max_tokens_to_sample": 200,
"temperature": 1.0,
"stop_sequences": ["\n\nHuman:"]
}
}Refer to the exhibit. This is an Amazon Bedrock invocation request for Claude. What is the purpose of the "stop_sequences" parameter?
⚠ Common exam trap
AWS often tests the distinction between parameters that control output length (max_tokens_to_sample) versus those that control output termination (stop_sequences), leading candidates to confuse token limits with stop sequences.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
It tells the model to stop generating when it encounters that sequence
The 'stop_sequences' parameter in Amazon Bedrock's invocation request for Claude tells the model to halt generation as soon as it encounters a specified character sequence. This allows developers to control the output format, such as stopping at a newline or a custom delimiter, ensuring the response ends exactly where intended.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
It tells the model to stop generating when it encounters that sequence
Why this is correct
The stop_sequences parameter supplies one or more strings that halt generation as soon as the model emits them, truncating output at that point. It satisfies the invocation request's need to control where Claude stops, rather than limiting token count or filtering content.
- ✗
It specifies a character sequence for the model to include in its response
Why it's wrong here
Stop_sequences are strings that terminate generation when produced, not content the model is instructed to include. Specifying text to appear in the response is achieved through the prompt itself, which is the correct mechanism when you require particular wording in the output.
- ✗
It limits the number of tokens in the response
Why it's wrong here
Token count is governed by max_tokens, not stop_sequences. Stop_sequences halts generation when the model emits a specified string. Limiting response length via token count would be the right control when you need a hard cap on output size regardless of content.
- ✗
It controls the randomness of the response
Why it's wrong here
Randomness is controlled by temperature and top_p, which shape the sampling distribution. Stop_sequences instead define strings that end generation. Adjusting temperature would be correct when you need to tune output variability, from deterministic to creative responses.
Go deeper
Related to this question
About these practice questions
Courseiva writes every AIF-C01 question from scratch — 862 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AIF-C01 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AIF-C01 exam.