Prompt Engineering: When Reasoning Helps
Reasoning helps when the answer needs maths, logic or several steps. A simple lookup gains nothing from step-by-step working.
Reasoning helps on a refund total
Three facts combine into one total, and the steps keep them straight.
A customer wants to return the Aurora Ceramic Mug and the Trailhead Canvas Tote. The mug costs 18 dollars. The tote costs 26 dollars. Both are unused and within 30 days. The ShopStack return policy allows returns within 30 days for unused items, with a full refund to the original payment method. Think step by step and then give the total refund amount.Reasoning adds nothing to a lookup
One fact, one answer, and the steps only repeat it.
Order 1042 belongs to Maya. It shipped and the tracking shows out for delivery. Think step by step and then answer this question: Where is order 1042?A multi-step decision about order 1043
An address change needs two checks before the answer.
A customer asks to change the delivery address on order 1043. Order 1043 is still processing and has not shipped. Address changes are allowed only before shipping. Think step by step and then answer: can the address be changed?Example
A customer asks to cancel order 1043. Order 1043 is still processing and has not shipped. An order can be cancelled with a full refund while it is still processing. Think step by step and then answer: can order 1043 be cancelled?Key points
- Reasoning helps when the answer is built from several facts.
- A refund total needs the price, the policy and the condition. Each fact is a step.
- A tracking question needs one fact. Steps add words, not value.
- Logic questions improve with reasoning. The steps catch a wrong turn early.
- Reasoning costs more words and more time, so it is used only where it helps.
This example runs a reasoning prompt against the local model and shows the reply it gave. The steps check the order state and the rule before the answer.
Note
Ask for steps when the answer is built. Skip the steps when the answer is looked up.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
When does reasoning help most?