Chain Of Thoughts

Chain-of-Thought (CoT) prompting has been making waves in the world of large language models (LLMs) by encouraging users to reason out their answers step-by-step. While standard prompts simply ask for an output, CoT prompts guide the model through a series of intermediate reasoning steps, mimicking the thought process of a human solving a problem. This opens up exciting possibilities for improving:


Here's how CoT works:


Examples of CoT prompts:

Solving a math word problem:

Writing a story:


Benefits of CoT:


Challenges of CoT:



Overall, CoT is a powerful and promising technique for enhancing the capabilities of LLMs. With its focus on guiding the model's reasoning process, CoT opens up new possibilities for human-AI collaboration and problem-solving.


CoT Example-1: Solving a Physics Problem 

Before

When the user gives below Prompt to Solve a Physics Problem to GPT3.5 then see the result. The LLM was not able to solve the problem even though the numerical values for F, m1 and m2 were provided in the Prompt. (See the last para in the below response given by ChatGPT where it says the numerical values were not given).

After

Now lets use the CoT technique by expanding the prompt to Solve the same Physics Problem using GPT3.5. You would see that the LLM was able to solve the problem without any issues by following the Steps provided in the Prompt.

A force of 5 N gives a mass m1, an acceleration of 10 m s–2 and a mass m2, an acceleration of 20 m s-2. What acceleration would it give if both the masses were tied together?

Question: A force of 5 N gives a mass m1, an acceleration of 10 m s–2 and a mass m2, an acceleration of 20 m s-2. What acceleration would it give if both the masses were tied together? 

Use the below Three Steps to solve the problem.

1) Individual accelerations:

Given a force of 5 N acting on mass m1, use Newton's second law (F = ma) to find its acceleration (a1).

Repeat the same equation for mass m2 and its acceleration (a2).

2) Combined masses:

Calculate the combined mass (m_combined) by adding m1 and m2.

3) Combined acceleration:

Apply Newton's second law again with the force (F) and combined mass (m_combined) to find the acceleration (a_combined) of both masses tied together.