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 (related to Newton's II law) 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.

CoT Example-2: Helping Legal Corporate Lawyer 

Scenario: A corporate lawyer needs to analyze a software licensing agreement between their company and a software vendor.

With-Out CoT

In the below prompt when we ask GPT 3.5 to fetch risks and liabilities from the agreement by NOT  giving any detailed sequence of steps then it is fetching some high-level points

With CoT


Now by using CoT-Chain-of-Thought technique when we provide a structured approach, the prompt helps the AI generate a more thorough and insightful analysis of the software licensing agreement, enabling the corporate lawyer to make informed decisions and mitigate potential risks.

Prompt: 

Analyse the software licensing agreement given in the following weblink to identify potential risks and liabilities. 

weblink: https://www.adobe.com/content/dam/cc/en/products/eula/third_party/pdfs/Third-PartyNotices_Photoshop_Desktop_2023.pdf

Prompt: 

Analyse the software licensing agreement given in the following weblink to identify potential risks and liabilities. 


weblink: (https://www.adobe.com/content/dam/cc/en/products/eula/third_party/pdfs/Third-PartyNotices_Photoshop_Desktop_2023.pdf). While analysing please use the below steps

1) First identify the key clauses, such as intellectual property rights, warranties, indemnification, limitations of liability, and termination provisions. 

2) Assess the potential legal and financial implications of each clause under different scenarios. For example, what happens if the software is found to infringe on third-party patents? What are the consequences of a breach of warranty? 

3) Finally, consider any potential conflicts with relevant data privacy laws or export control regulations.