Rome Wasn't Built in a Day, Understanding Chain of Thought Prompting
Chain of Thought
prompting is a method that helps AI solve complex problems step-by-step while guiding it to explain its reasoning process. It is commonly abbreviated as CoT
.
CoT not only involves asking AI to find an answer but also requires a step-by-step explanation of how that answer is reached. Often, phrases like step-by-step
or in order
are included at the end of a prompt to encourage sequential reasoning.
CoT prompting was concretized in a 2022 Google research paper, Chain of Thought Prompting Elicits Reasoning in Large Language Models. According to the paper, CoT prompts improved the accuracy of responses from the GPT-3 model from 38.0%
to 54.5%
.
This approach is particularly effective in improving outcomes for problems requiring mathematical reasoning by analyzing problem scenarios step-by-step.
How Can I Use It?
CoT prompting includes multiple scenarios within a single prompt similar to Few-Shot Prompting, but it guides each scenario to be reasoned out and resolved step-by-step.
You received $500 as a business travel budget.
You spent $200 on hotel accommodation,
and $100 on transportation.
From the remaining amount, you plan to use $20 per meal.
How many meals can you have at most?
Please calculate it step-by-step.
Starting Point: You received $500 as a business travel budget.
Total Budget: $500
First Expense Review: You spent $200 on hotel accommodation.
Remaining Budget Calculation: $500 - $200 = $300
Second Expense Review: You spent $100 on transportation.
Remaining Budget Calculation: $300 - $100 = $200
Remaining Amount Check: After spending on hotels and transportation, you have $200 left.
Current Remaining Budget: $200
Unit Cost Confirmation: You plan to use $20 per meal.
Cost per Meal: $20
Maximum Number of Meals Calculation: Calculate the maximum number of meals possible with the remaining money.
Calculation Method: Remaining Amount ÷ Cost per Meal = $200 ÷ $20
Final Calculation and Result:
Calculation Result: $200 ÷ $20 = 10 meals
Maximum Number of Meals: 10 meals
Answer:
You can have a maximum of 10 meals.
CoT excels in solving mathematical problem scenarios, as shown above, but it can also be applied to general situations requiring step-by-step analysis, as seen below.
You are preparing for a marketing plan presentation for summer air conditioner sales.
Provide the necessary content for each step of the presentation preparation.
1. Research
2. Must-Include Content in Presentation Slides
3. Points to Note During the Presentation
4. Presentation Script
1. Research
- Market Analysis: current market size for air conditioners, growth rate, major trends
- Competitor Analysis: main competitors' product features, price range, marketing strategies
- Consumer Analysis: consumer preferences, purchase factors, key target groups (age, region, income level)
- Product Analysis: key features, advantages, and technical superiority of the company's air conditioners
- Past Data Analysis: previous summer air conditioner sales data and effective marketing channels
2. Must-Include Content in Presentation Slides
- Market and Consumer Analysis: Market status, target consumer analysis
- Competitor Comparison: Comparison with main competitors' products
- Marketing Goals: Specific sales goals, market share goals
- Marketing Strategy:
- Product Strategy: Product USP (Unique Selling Proposition)
- ...
Thus, CoT prompting uses crucial keywords like step-by-step, in order to direct AI toward sequential reasoning and can be effectively applied in solving mathematical problems and general situations requiring step-by-step analysis.
Practice
Send a prompt example and compare the AI's response.
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.