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.

OpenAI Cofounder Ilya Sutskever: "We've Hit Peak Data." What's Next for AI?

OpenAI Cofounder Ilya Sutskever: "We've Hit Peak Data." What's Next for AI?

OpenAI Co-Founder and Former Chief Scientist Ilya Sutskever suggests AI will evolve in these three key ways. Also this week, OpenAI's Shipmas summary, big launches from Google, and more.
OpenAI Cofounder Ilya Sutskever: "We've Hit Peak Data." What's Next for AI?

OpenAI Cofounder Ilya Sutskever: "We've Hit Peak Data." What's Next for AI?

OpenAI Co-Founder and Former Chief Scientist Ilya Sutskever suggests AI will evolve in these three key ways. Also this week, OpenAI's Shipmas summary, big launches from Google, and more.
The Paradox of Choice in Generative AI: A Framework for Simplifying Decisions in 2024

The Paradox of Choice in Generative AI: A Framework for Simplifying Decisions in 2024

For the first issue of his newsletter, Anthony Onesto tackles one of the hairiest topics most HR leaders are running into: how to select AI tools.
The Paradox of Choice in Generative AI: A Framework for Simplifying Decisions in 2024

The Paradox of Choice in Generative AI: A Framework for Simplifying Decisions in 2024

For the first issue of his newsletter, Anthony Onesto tackles one of the hairiest topics most HR leaders are running into: how to select AI tools.
The Unbundling and Rebundling of Jobs // Trillion Dollar Hashtag #3

The Unbundling and Rebundling of Jobs // Trillion Dollar Hashtag #3

In the second of our series exploring ten themes that will shape the next decade, Antony Slumbers looks at how every knowledge worker's job is set to change over the next years.
The Unbundling and Rebundling of Jobs // Trillion Dollar Hashtag #3

The Unbundling and Rebundling of Jobs // Trillion Dollar Hashtag #3

In the second of our series exploring ten themes that will shape the next decade, Antony Slumbers looks at how every knowledge worker's job is set to change over the next years.
Are You Seeing Your Employees as Customers?

Are You Seeing Your Employees as Customers?

Treating employees like customers to create a more engaged and productive workforce.
Are You Seeing Your Employees as Customers?

Are You Seeing Your Employees as Customers?

Treating employees like customers to create a more engaged and productive workforce.
Employees as Customers: Designing Unified People Experiences

Employees as Customers: Designing Unified People Experiences

Is HR stuck in the past? Tim Reitsma and Sapienx Founder Luke O'Mahoney dive into how breaking HR silos and treating work like a product may be the biggest unlock companies need to evolve.
Employees as Customers: Designing Unified People Experiences

Employees as Customers: Designing Unified People Experiences

Is HR stuck in the past? Tim Reitsma and Sapienx Founder Luke O'Mahoney dive into how breaking HR silos and treating work like a product may be the biggest unlock companies need to evolve.
Practical Implications of OpenAI O1 Updates for Non-Technical Users

Practical Implications of OpenAI O1 Updates for Non-Technical Users

OpenAI’s o1, o1 pro, and Sora, write a targeted cover letter with ChatGPT, a tool to automate your LinkedIn growth, and more.
Practical Implications of OpenAI O1 Updates for Non-Technical Users

Practical Implications of OpenAI O1 Updates for Non-Technical Users

OpenAI’s o1, o1 pro, and Sora, write a targeted cover letter with ChatGPT, a tool to automate your LinkedIn growth, and more.
The New ‘Hybrid Teams’: Humans and AI Agents Working in Harmony

The New ‘Hybrid Teams’: Humans and AI Agents Working in Harmony

HubSpot CTO Dharmesh shares a bold vision for AI agents in the workforce. Highlights: Copilot Vision reading your browsing, OpenAI's "12 Days of Shipmas" (o1, ChatGPT Pro, Sora), Amazon’s genAI model family, and more.
The New ‘Hybrid Teams’: Humans and AI Agents Working in Harmony

The New ‘Hybrid Teams’: Humans and AI Agents Working in Harmony

HubSpot CTO Dharmesh shares a bold vision for AI agents in the workforce. Highlights: Copilot Vision reading your browsing, OpenAI's "12 Days of Shipmas" (o1, ChatGPT Pro, Sora), Amazon’s genAI model family, and more.
Launching the AI in HR Today with Anthony Onesto Newsletter

Launching the AI in HR Today with Anthony Onesto Newsletter

Explore the transformative role of AI in Human Resources from the Chief People Officer at Suzy.
Launching the AI in HR Today with Anthony Onesto Newsletter

Launching the AI in HR Today with Anthony Onesto Newsletter

Explore the transformative role of AI in Human Resources from the Chief People Officer at Suzy.