Chain of Thought Prompting: Enhancing AI Reasoning and Decision-Making

Written by Coursera Staff • Updated on

Chain of thought prompting is a technique for increasing the reasoning power of a large language model by asking it to use a step-by-step approach when prompt solving. Learn how this technique works and how to write chain of thought prompts.

[Featured Image] An AI professional sits in an office space, using chain of thought prompting to help build software solutions for his organization.

Chain of thought prompting allows you to provide instructions to an AI model that can result in improved reasoning and accuracy as well as reduced error. It creates results by leading the model through a series of prompts to arrive at a more complex answer. 

For example, if you asked a large language model (LLM) to solve a complex math equation, it may initially say it is incapable of performing that function. But if you walk it through the process step by step, first defining the equation, then plugging in data and variables, it may be able to reach a solution. Ultimately, even though the model isn’t capable of solving a complex math equation on its own, you can use chain of thought prompting to increase its ability to reason and use logic. 

Learn more about what chain of thought prompting can do, how it can help you, and careers that may benefit from using chain of thought prompts. 

What is chain of thought prompting?

Chain of thought prompting, or prompting an AI model to walk through a series of steps while it solves a problem, is a method for increasing the reasoning power of a large language model. Anthropic, the creators of the AI model Claude, call it “giving Claude space to think [1].” 

Chain of thought prompting is a type of prompt engineering, or the process of carefully designing your AI prompts to get the best results. Prompt engineering is an important component of working with generative AI models. Therefore, chain of thought prompting can help you design AI prompts that give more thoughtful, reasoned answers to complex problems. 

You can either lead the AI model through the chain of thought process manually, asking it to solve the problem one step at a time, or you can simply ask the AI model to follow a predetermined step-by-step process. Both solutions will allow the AI model to give you a more nuanced response. 

Chain of thought prompting benefits

Chain of thought prompting’s benefits include potentially helping you solve more complex problems with improved accuracy. A 2022 study found that chain of thought prompting was capable of allowing a simple language model to perform at the level of a more sophisticated, finely tuned algorithm. The study’s authors called the results of their study “striking [2].” That improved reasoning ability can also provide a more accurate result and lead to better-organized, easier-to-follow responses. 

You may also enjoy other chain of thought prompting benefits. This technique may help you better understand how the AI model made the decision it did, increasing transparency and making it easier to spot and troubleshoot problems.

Types of chain of thought prompting

Depending on your need, you can use three key types of chain-of-thought prompting: zero-shot, automatic, and multimodal. 

Zero-shot: Zero-shot chain of thought (zero-shot COT) prompting allows a computer model to recognize patterns from training while following step-by-step instructions. This process allows it to come to an answer, even if it’s never had training on the specific problem you’re asking it to solve. You can also use zero-shot COT to give a computer a step-by-step process to follow, which will help the algorithm structure the response and determine how to find the answer without specific training.

Automatic: Automatic chain of thought prompting is a technique that builds on zero-shot prompting. It allows a computer model to determine the step-by-step approach it should take by first asking questions about the problem and then sorting those questions into the correct order needed to complete the task. This type of chain of thought prompting allows you to use a more streamlined and efficient process to reach a solution. 

Multimodal: Multimodal chain of thought prompting allows your AI to use both images and text to solve problems. This step-by-step process makes it possible for you to provide your AI model with an image and ask the model to answer questions or solve problems using the image as a reference. For example, you can upload an image of the vehicle and ask about the model’s features. 

Applications of chain of thought prompting

Chain of thought prompting has many potential applications. For example, you could use this method to increase the reasoning and logic abilities of a less complex AI model. You could also use chain of thought prompting with a simple or less expensive model to get results that rival a more advanced model. 

Two areas where chain of thought prompting is especially helpful are arithmetic reasoning and commonsense reasoning. For arithmetic reasoning, chain of thought prompting lets you coax a less advanced large language model to complete mathematical word problems by breaking the complex process into simple commands.

Commonsense reasoning refers to the type of information you’d expect a person to know if they had a normal level of experience in the world. You can simulate it in AI models using chain of thought prompting. For example, you can ask an LLM what to do if you have a toothache, and the model might use commonsense reasoning to determine possible causes of your toothache and actions you could take to minimize pain or seek treatment. 

You can apply chain of thought prompting principles to any of the ways you can use a large language model, a seemingly endless number of uses. Other ways you can use it include:

  • Making a list of brainstorming ideas

  • Generating images

  • Requesting information

  • Summarizing documents

Who uses chain of thought prompting?

Careers that use chain of thought prompting include those that allow you to work with and collaborate with large language models, such as AI researchers, data scientists, and AI developers. 

AI researchers

Average annual salary in the US (Glassdoor): $99,475 [3]

Job outlook (projected growth from 2023 to 2033): 26 percent [4]

As an AI researcher, you will either find new ways to advance the field of artificial intelligence or develop AI-based solutions to solve real-world problems. Depending on your project, you could complete the following tasks: 

  • Prepare data for training AI models 

  • Develop new AI models

  • Apply your research to implement new ideas

Data scientists

Average annual salary in the US (Glassdoor): $118,252 [5]

Job outlook (projected growth from 2023 to 2033): 36 percent [6]

As a data scientist, you will help companies and organizations extract meaning from data. Depending on the industry or company you work for, you may do the following: 

  •  Determine what data you need

  • Discover methods of collecting the data, including prompt engineering

  • Store, organize, and clean your data

  • Apply analytical principles to determine what your stakeholders can learn 

  • Present the data to senior staff or your client 

AI developers

Average annual salary in the US (Glassdoor): $111,144 [7]

Job outlook (projected growth from 2023 to 2033): 17 percent [8]

As an AI developer or AI software developer, you will design, create, and implement AI software solutions on behalf of your company or client. Depending on the project, you may do the following:

  • Develop the architecture your system will need

  • Train stakeholders and your team members on how to use the technology

  • Keep up to date on the latest advances in AI technology to offer your clients cutting-edge solutions

Learn more about AI and chain of thought prompting on Coursera

Chain of thought prompting can help you get more reasoning and logical capabilities from large language models. Learn more about working with LLMs and crafting excellent AI prompts on Coursera. 

For example, enroll in Generative AI with Large Language Models, offered in partnership between Amazon Web Services and DeepLearning.AI, to learn skills in machine learning, LLMs, and generative AI. Or build skills for a career using these models with the Prompt Engineering Specialization offered by Vanderbilt University. In this course, you can learn about generative AI, prompt engineering, and advanced data analytics using ChatGPT. 

Article sources

1

Anthropic. “Let Claude think, https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/chain-of-thought.” Accessed February 6, 2025. 

Keep reading

Updated on
Written by:

Editorial Team

Coursera’s editorial team is comprised of highly experienced professional editors, writers, and fact...

This content has been made available for informational purposes only. Learners are advised to conduct additional research to ensure that courses and other credentials pursued meet their personal, professional, and financial goals.