AI in the Workplace
7
min read

Chain of Thought Prompting: Step-by-Step for Better Reasoning

Enhance AI reasoning with chain of thought prompting. Break down complex problems into manageable steps for accurate, transparent, and effective decision-making.
Published:
August 7, 2024
Last updated:
October 15, 2024

Also available on:

Future Work - Listen on Spotify
Future Work - Listen on Apple Podcasts
Future Work - Watch on Youtube
chain-of-thought-prompting

You’ve been using ChatGPT.

You’ve mastered advanced prompting techniques like the CO-DO framework (perhaps helped by our prompt generator or taking one of the best generative AI courses.)

But you still feel like you could get more out of AI.

Well, if that’s the case, please meet “chain of thought prompting.” This powerful technique is a game-changer in problem-solving and reasoning. 

By breaking down complex issues into smaller, manageable steps, we can tackle challenges more effectively and devise innovative solutions.

If you’d like to learn this technique, read along and see how it can transform how we approach business problems. 

Understanding Chain of Thought Prompting

At its core, chain of thought prompting is about asking an AI model during inference to ‘show its work.’ 

Similar to how a student may do better when they need to articulate their thinking, rather than just giving the answer, studies show that asking for the ‘chain of thought’ makes AI’s outputs more accurate. 

Few-shot Chain of Thought Prompting

While asking for the AI’s thinking process boosts accuracy and the quality of reasoning, another method, “few-shot” prompting, can make it even more powerful.

For context, just asking to ‘think step by step’ is considered ‘Zero-Shot” prompting, with ‘shot’ being another word for examples.

But giving a few sample answer, actually helps the AI ‘think’ better.

So, instead of just asking for an answer, we give an example (‘shot’) of how the model should reason first.

Here’s an example from the paper that introduced the technique: 

Here, we see that when we give an example of approaching a challenge similar to the one we’re about to ask the AI to solve, we get the right result. 

For very challenging questions, it can help to add multiple examples in the prompt before asking your question.

The 'Let's think step by step' approach

The beauty of Zero-Shot CoT, asking AI to think step-by-step without any examples, lies in its simplicity. 

All we need to do is add the phrase "Let's think step by step" to our prompts. It's like giving the AI a gentle nudge to break down complex problems into manageable pieces. 

For instance, instead of just asking, "Solve this problem for me," we can say, "Solve this problem for me. Let's think step by step." 

This simple addition guides the AI in providing a more structured and detailed response. 

Basically, ‘showing its work' means the AI is walking us through its reasoning process step by step. 

How to Activate Chain of Thought Prompting

To use this technique, we simply add instructions like "Describe your reasoning in steps" or "Explain your answer step by step" to our queries. 

This prompts the AI to think out loud, giving us insight into how it arrived at its conclusion.

If we want to improve the outputs further, we can give a few examples (‘shots’) of what the correct process of thinking is. 

How it differs from standard prompting

Standard prompting typically asks for a direct answer, while chain of thought prompting asks for the journey to that answer. 

It's the difference between asking, "What's 2+2?" and "Can you explain how you'd calculate 2+2?"

This approach mimics how we humans often tackle complex problems. We break them down into smaller, more manageable pieces. 

By asking AI to do the same, we're leveraging its vast knowledge base and processing power in a more structured way.

Benefits of Chain of Thought Prompting

The benefits of taking a chain of thought prompting approach are significant, especially for tasks that require logic, calculation, and decision-making. 

Here's why it's so effective:

  1. Improved accuracy: By breaking down complex problems, AI can process smaller components individually, leading to better response precision.
  2. Transparency: The step-by-step reasoning makes the AI's thought process visible, building trust and making spotting errors easier.
  3. Better handling of complex tasks: It helps the AI focus on one part of the problem at a time, reducing the risk of errors when juggling too much information simultaneously.
  4. Debugging and improvement: By seeing the AI's reasoning process, developers can better understand how the model reaches its conclusions, which can help in model refinement.

Additional Advanced Prompting Techniques

Thread of Thought

Dealing with a complex data source, and still not getting the right outputs from AI?

According to research by Yucheng Zhou and others, the Zero-Shot Chain of Thought can be improved by asking for a ‘Thread of Thought.’

A Thread of Thought (ThoT) is inspired by how humans think and is designed to deal with complex texts where many potential distractors could throw AI off its game.

As the paper highlights, ThoT can be valuable, especially when we feed data to AI that’s hard to work with due to its complexity:

The key is to ask for a ‘thread of thought’ and bring order to our text in the analysis process. We do this by asking, “Walk me through this context in manageable parts step by step, summarizing and analyzing as we go.”

Contrastive Chain-of-Thought

Contrastive Chain-of-Thought is similar to a regular CoT prompt, but works by giving AI the wrong example. 

In your example, you show the wrong way to reason, which leads to the AI understand how not to think, leading to better examples.

This example from LearnPrompting.org’s course on advanced prompting illustrates the idea well:

Tabular Chain of Thought

Tabular CoT is a variation of Chain of Thought prompting where the outputs are formatted in a table. 

“Tab-CoT”, as proposed by Ziqi Jin and Wei Lu, organizes the reasoning process into a tabular format, which allows for both horizontal and vertical reasoning. 

This method provides a highly structured approach, making it easier for AI to handle complex reasoning tasks across multiple dimensions. 

For example, a problem is broken down into steps with specific columns like step, subquestion, process, and result. 

By integrating Tab-CoT, you can enhance the AI’s capability to perform detailed and structured reasoning, improving the accuracy and clarity of the outputs.

Conclusion

Incorporating Chain of Thought (CoT) prompting into your AI interactions can significantly enhance problem-solving and decision-making processes. 

By breaking down complex problems into manageable steps and encouraging detailed reasoning, CoT prompting leads to more accurate and transparent outputs. 

Whether using Zero-Shot CoT by simply instructing the AI to think step-by-step or leveraging Few-Shot CoT with specific examples, this approach mimics human reasoning and improves the AI's performance on intricate tasks. 

Implementing CoT in various business scenarios, from financial calculations to strategic decision-making, can transform how challenges are approached and solutions are devised. As AI evolves, mastering these advanced prompting techniques will be crucial in harnessing its full potential, ensuring more precise, reliable, and insightful outcomes.

Want to continue learning AI with over 100 global business leaders? Join Lead with AI.

Also available on:

Future Work - Listen on Spotify
Future Work - Listen on Apple Podcasts
Future Work - Watch on Youtube
TRANSCRIPT

Our latest articles

FlexOS helps you stay ahead in the future of work.

The Future of HR: Personalization, AI, and Human-Centered Workplaces

The Future of HR: Personalization, AI, and Human-Centered Workplaces

Is HR’s One-Size-Fits-All Era Over? Anna Tavis on Why Personalization, AI, and Inclusivity Will Define the Future of Work.
AI Colleagues, Personalization, and a CEO Rejecting the Return to Office

AI Colleagues, Personalization, and a CEO Rejecting the Return to Office

As HR leaders, the election might be behind us, but the real marathon begins now: navigating policy shifts, fostering empathetic conversations, and keeping it all together without breaking a sweat.
How Microsoft's Magentic-One Impact The Future Of Work (+10 AI Workflows To Boost Productivity)

How Microsoft's Magentic-One Impact The Future Of Work (+10 AI Workflows To Boost Productivity)

Microsoft’s Magentic-One, AI workflows and apps to boost productivity, OpenAI's slowdown, open roles at robotics companies, and more.
Report: How Companies Roll Out AI Successfully

Report: How Companies Roll Out AI Successfully

A new report from Asana's Work Innovation Lab highlights the current state of AI at work, its key barriers, and what the highest-velocity companies do differently to make AI a success.
From Cost Center to Business Function: The Power of Total Rewards in HR

From Cost Center to Business Function: The Power of Total Rewards in HR

David Turetsky unveils the future of total rewards—shifting HR from cost to value with personalized growth, engagement, and lasting impact.
How Will HR Adapt After Trump's Victory?

How Will HR Adapt After Trump's Victory?

November 7, 2024
3
min read
How Will HR Adapt After Trump's Victory?

How Will HR Adapt After Trump's Victory?

Donald Trump is back in the spotlight as he takes the presidency: What Does It Mean for HR?
ChatGPT Search vs. Google Search: Choose the Right Tool for Your Queries

ChatGPT Search vs. Google Search: Choose the Right Tool for Your Queries

Things ChatGPT Search can do better, and worse, than Google Search, Perplexity’s Election tracker, and more.
How Workplace Experience Managers Are Becoming the Linchpin Of Hybrid Success

How Workplace Experience Managers Are Becoming the Linchpin Of Hybrid Success

Workplace Experience Managers bring together people, places, and tech. And we need more great ones. Here's a look into what they do, and what it takes to become one.