Few-shot and reasoning — examples that work, and the CoT trap on reasoning models — step 6 of 9
This build_prompt function unconditionally appends "Think step
by step." to every prompt — even when the model is a reasoning
model (o3, Claude with thinking, etc.). On reasoning models, this
is at best wasted tokens and at worst hurts answer quality.
Fix the function to ONLY append the CoT prefix when the model is
NOT in REASONING_MODELS.
Expected output:
o3 cot? False
claude-haiku cot? True
This build_prompt function unconditionally appends "Think step
by step." to every prompt — even when the model is a reasoning
model (o3, Claude with thinking, etc.). On reasoning models, this
is at best wasted tokens and at worst hurts answer quality.
Fix the function to ONLY append the CoT prefix when the model is
NOT in REASONING_MODELS.
Expected output:
o3 cot? False
claude-haiku cot? True
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.