Claude Certified Architect – Foundations Practice Question 56: Reasoning Answer Tags

Claude Certified Architect, Foundations · Test 6 · question 6 of 10

Prompt Engineering & Structured Outputeasy

A team calls Claude Haiku 4.5 with thinking turned off to solve multi-step billing calculations. Accuracy improves when Claude works through the problem before answering, but the application shows only the final figure to users and currently has to guess where the reasoning ends. How should the team change the prompt so the final result can be extracted reliably?

Select one answer
Show answer and explanation

Answer:

  • D. Ask Claude to think the problem through first and put the final answer in <answer> tags, then parse that tag in code

D is correct. When thinking is off, manual chain-of-thought is the fallback: ask Claude to think through the problem before answering and to wrap the final answer in a tag such as <answer> so it can be extracted. The reasoning stays in the response for accuracy, and code reads only the tagged span.

A is wrong because answering before reasoning removes the benefit of working it out first, and a blank line is an unreliable delimiter. B is wrong because Claude has no private scratchpad when thinking is off; asking for only the number gives up the step-by-step reasoning that improved accuracy. C is wrong because one request returns one assistant response; a system prompt cannot split it into separate messages. On the newest models, use the thinking feature instead of asking for reasoning in tags.

Reference: Prompting best practices

Practice Test 6 ›

Study guides for Claude Certified Architect, Foundations