CCDV-F Prompt and Context Engineering Practice Question
Exhibit
{
"model": "claude-3-5-sonnet-20240620",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Analyze this log: <log>ERROR 404</log>. Use <thought> tags for logic."}
],
"stop_sequences": ["</thought>"]
}Refer to the exhibit. If this request is sent to Claude, what will be the result of the generated output?
⚠ Common exam trap
Candidates often miss the dangerous implication of setting closing reasoning tags as stop sequences, assuming the model will intelligently continue generating past the stop string.
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
✓
The model will output its reasoning and then stop, omitting the final answer.
Stop sequences tell the API to terminate generation as soon as a specific string is produced. In this scenario, the developer has set the closing </thought> tag as a stop sequence. This means the model will stop immediately after it finishes its reasoning process, and the final answer that usually follows the thinking block will never be generated or returned.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The model will output its reasoning and then stop, omitting the final answer.
Why this is correct
Because the stop sequence is set to the closing tag of the reasoning block, the API will cut off the response the moment that tag is generated. This is useful for developers who only want to see the internal logic or who are running a multi-step pipeline where reasoning is the only required output.
- ✗
The model will ignore the stop sequence because it is inside an XML tag.
Why it's wrong here
Stop sequences are treated as literal strings and are not affected by XML structure. If the model generates the characters '</thought>', the generation will cease regardless of the context. The API does not distinguish between tags and plain text when evaluating stop sequences during the inference process.
- ✗
The API will return an error because the stop sequence must be a single word.
Why it's wrong here
Stop sequences can be any string, including multiple words, special characters, or XML tags. There is no requirement for them to be a single word. In fact, using closing XML tags or newline characters is a very common and recommended practice for controlling the output format of Claude.
- ✗
The model will generate the full answer, but the </thought> tag will be hidden.
Why it's wrong here
A stop sequence does not just hide the specified string; it stops the generation of any subsequent tokens. Therefore, anything that would have naturally followed the '</thought>' tag in the model's response will never be produced by the model. This results in a truncated response rather than a filtered one.
About these practice questions
One of 257 original CCDV-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Anthropic exam blueprint
This CCDV-F practice question is part of Courseiva's free Anthropic 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 CCDV-F exam.