solidcodersolidcoder
Explore Courses
solidcodersolidcoder
CoursesAboutPrivacy PolicyTerms
© 2026 solidcoder · Practical courses for software engineering interviews.
Home/AI Engineering/Prompt Engineering/Getting the Model to Show Its Work
Chapters — Prompt Engineering▾

Getting the Model to Show Its Work

Prompt Engineering·Leveling Up·6 min read·Sep 5, 2026

How asking an AI to reason step by step improves accuracy on math, trade-off decisions, and multi-cause diagnosis.

Ask for the work, not just the answer

A math teacher asks students to show their work for a reason: it catches mistakes and proves understanding. Asking an AI model to reason step by step does the same thing: you get a more reliable answer, and you can see exactly where it might have gone wrong if something looks off.

  • Calculations and multi-step math
  • Trade-off decisions with more than one factor
  • Diagnosing a problem with several possible causes
  • Anything where a wrong intermediate step quietly breaks the final answer
Zero-shot: just ask it to think it through
A team splits a $2,340/year software cost three ways, and one member is joining 4 months into the year. What should that member pay for their first year, prorated? Think step by step.
Open in ChatGPT ↗

Step 1: Monthly cost per person if split 3 ways = $2,340 ÷ 3 ÷ 12 = $65/month. Step 2: Remaining months in the year for the new member = 12 − 4 = 8 months. Step 3: Prorated cost = $65 × 8 = $520. The new member owes $520 for their first year.

A decision with trade-offs
Compare Hosting Plan A ($40/month, no setup fee) against Plan B ($0.02 per visitor, expecting 3,000 visitors/month) over 12 months. Which is cheaper, and by how much? Work through it.
Open in ChatGPT ↗

Plan A: $40 × 12 = $480/year. Plan B: 3,000 × $0.02 = $60/month → $60 × 12 = $720/year. Plan A is cheaper by $240/year. Plan B only wins if monthly traffic drops below 2,000 visitors.

Match the trigger phrase to the task

Calculations
"Work through each number separately before combining them."
Analysis
"Consider each factor independently, then combine your findings."
Decisions
"Weigh the options against these specific criteria, one at a time."
Diagnosis
"List the possible causes, then say how you'd test each one."

When step-by-step goes wrong

Symptom → fix
A math slip in one step throws off the final answer
Add: "double-check each calculation before moving to the next step."
The reasoning is technically correct but exhausting to read
Add: "keep each step to one sentence."
It skips a consideration you cared about
Name it explicitly: "...considering cost, timeline, and team capacity."
Some steps are sharp, others hand-wavy
Add: "after reasoning, review each step for soundness before giving the final answer."
What a good chain-of-thought answer looks like

Each step follows from the one before it, assumptions are stated rather than silently assumed, and the final answer is something you could verify by re-reading the steps, not something that appears out of nowhere at the end.

Up next1/3
Part 4 · Leveling Up
Next Chapter →
Teaching By Example
6 min · continue reading
→
← Prev Section
When Things Go Sideways
Fixing Bad Outputs Fast
Next Section →
Connection Layer (MCP)
Why MCP Exists
Part of a free guide

Prompt Engineering

A simple guide to writing better prompts, so AI gives you the answer you actually want.

Browse All Guides →
On this page
  • Ask for the work, not just the answer
  • Match the trigger phrase to the task
  • When step-by-step goes wrong