• Module 2 · Core Techniques
  • 2 min read · about 20 min lab
  • Builds: Your own prompt library

Chain-of-Thought Prompting: Get Better AI Reasoning Step by Step

Get better AI reasoning by asking models to work through problems step by step.

Key takeaway & what you'll build

Chain-of-thought prompting asks the model to work through a problem step by step before answering. It helps most with multi-step problems such as calculations, plans, and decisions, because each step is visible and can be checked. Ask for the steps, then the answer on its own line.

You'll build: Your own prompt library

Show your work

When a model jumps straight to an answer, you get a number or a verdict you can't check. Chain-of-thought (CoT) prompting asks it to reason through the problem step by step first. Two things improve:

  1. You can check it. Each step is visible, so a wrong turn is easy to spot.
  2. It's more reliable on hard problems. Writing out intermediate steps gives the model's later predictions something solid to build on.

The same problem, both ways

Direct: "A store has 150 apples. It sells 40% on Monday, receives 30 more on Tuesday, and sells a third of its stock on Wednesday. How many apples are left? Answer with a number." You get a number, perhaps 80, and no way to know if it's right without doing the maths yourself.

Chain-of-thought: the same problem, plus "Work through it one day at a time, showing the count after each day. Then give the final answer on its own line."

  • Monday: 40% of 150 is 60 sold, so 90 left.
  • Tuesday: 90 + 30 = 120.
  • Wednesday: a third of 120 is 40 sold, so 80 left.

Final answer: 80 apples. Now every step can be checked.

When to use it

  • Multi-step maths and estimates: pricing, budgets, timelines
  • Plans and decisions: "compare these three options against my criteria, then recommend one"
  • Diagnosis: "list the likely causes, rule each one in or out, then give the most likely"

For simple tasks (rewrite this sentence, translate this paragraph) it just adds length.

Phrasing that works

  • "Think through this step by step before answering."
  • "First list the facts you're using. Then reason through them. Then answer."
  • "Show your working, then put the final answer on its own line."

The last one is handy when you want to reuse the answer: the reasoning is there to check, and the answer is easy to find. Some models reason internally before replying; asking for visible steps still helps you check the result.

Try it

Take a real decision you're weighing, such as two tools, two offers, or two schedules. In Ask Ace, ask for a recommendation directly, then again with a chain-of-thought instruction. Which answer would you trust? The lab is next.

Before and after

A multi-step word problem (example)

Before

Prompt

A store has 150 apples. It sells 40% on Monday, receives 30 more on Tuesday, and sells a third of its stock on Wednesday. How many apples are left? Answer with a number.

Output

80

After

Prompt

A store has 150 apples. It sells 40% on Monday, receives 30 more on Tuesday, and sells a third of its stock on Wednesday. How many apples are left?

Work through it one day at a time, showing the count after each day. Then give the final answer on its own line.

Output

Monday: 40% of 150 is 60 sold, so 150 − 60 = 90.
Tuesday: 90 + 30 = 120.
Wednesday: a third of 120 is 40 sold, so 120 − 40 = 80.

Final answer: 80 apples

Both answers are right here, but only the second can be checked. On harder problems, writing out the steps also makes a wrong step less likely.

Hands-on lab

Chain-of-Thought in Action

Write two prompts for the same multi-step problem: one that asks for the answer directly and one that asks for step-by-step reasoning. Run both in Ask Ace, record what each returned, and explain in two or three sentences why the chain-of-thought version is better, or when it wouldn't be.

What the AI grader checks for

  • Direct prompt (20%): A clear prompt that asks for the answer to the problem without asking for reasoning.
  • Chain-of-thought prompt quality (40%): The prompt clearly asks for step-by-step reasoning, with structure such as one step per stage or the final answer on its own line.
  • Analysis (30%): Explains why visible reasoning helps (checkable steps, fewer errors on multi-step problems) and notes when it adds little.
  • Recorded honestly (10%): Both outputs are recorded as returned, and the submission is easy to follow.

Ask the AI course tutor

The tutor knows this whole course. Pick a question to start a conversation about this lesson.