39.4 Multi-step reasoning with enforced intermediate artifacts

Overview and links for this section of the guide.

Thinking Tags

Force the model to show its work using XML tags.

You must output in this format:

Analyze the user request.
List the files involved.
Plan the change.


...

Why It Works

The model generates tokens sequentially. By forcing it to generate the `` block first, those tokens become part of the context for the ``. The model effectively "talks itself into the right answer."

Where to go next