What is the Chain of Thought? What is the value? How to use it?

With the continuous development of AI technology, how to improve its interpretability and reasoning ability has become a research hotspot. This article delves into Chain of Thought (CoT) technology, explaining the core concepts and values of CoT but also showing how to improve model performance through specific examples and prompts.

With aboutAI explainabilityThe discussion is gradually entering the mainstream, and more and more people are curious about unraveling the “black box” of large language models (LLMs). Asking questions to large models can always get a variety of answers, sometimes giving you ideas, sometimes giving you answers, and sometimes becoming your teacher!

01. What is COT?

Chain-of-thought (CoT) is a technology that enhances the reasoning capabilities of large language models (LLMs).

A groundbreaking study by researchers at Google AI in 2022 laid the groundwork for this chain of thought study. Studies have proven that CoT prompts are highly effective in tasks such as solving math word problems. Compared to traditional prompt word engineering, following the LLM’s thought process, demonstrating the steps and equations used, significantly improved the model’s performance.

https://research.google/blog/language-models-perform-reasoning-via-chain-of-thought/

Large language models (LLMs) excel at predicting the next word. However, LLMs are actually difficult to solve problems that need to be thought about step by step, and need to be done through prompt word engineeringguideLanguage models such as GPT-4o or Claude Sonnet 3.5/3.7 give better answers, especially when it comes to complex reasoning tasks, CoT Prompt is a great solution, with the examples you provide (step-by-step reasoning ideas and processes),This includes, but is not limited to: identifying key information, applying rules, and types of conclusions drawn, similar to guiding AI to calculate results through step-by-step prompts, LLMs learn and follow the thought process provided in your example when outputting answers.

How can product managers do a good job in B-end digitalization?
All walks of life have taken advantage of the ride-hail of digital transformation and achieved the rapid development of the industry. Since B-end products are products that provide services for enterprises, how should enterprises ride the digital ride?

View details >

Traditional AI training is often like a “black box”: you give it a bunch of data (like a movie review), and it outputs a result (positive or negative) directly. The CoT method is different,It breaks down the inner workings of this process.

The core goal of chain-of-thought prompts is to balance clarity, creativity, and coherence, not just tell LLMs how to output, just like teaching detectives to solve crimes, you can’t just say, “Find the culprit.” Instead, they need to use a few cases to teach them analysis. Similarly, when giving AI a prompt, don’t just say “recognize emotions”, but give it some specific examples and tell it how to break down the problem step by step, such as how to read the text, analyze the words, and combine the context to finally arrive at an emotional judgment.

Chain of Thought Prompt (CoT Prompt)There is another way to say it:‘response_format’ (answer template), in fact, I think this statement is easier to understand, that is, literally, tell the large model an answer template, let the large model reply according to the template you provide, the more comprehensive this template, the more detailed the logic, the more detailed the reply you receive, but this template is generally built in at the technical level, the following is an example: For example, you want your AI to calculate a math problem: You can “teach” him like this:

Xiao Ming had 12 cookies and ate 4 of them. How many cookies does she have left? When answering, you need to calculate like this:

Step 1: “How many cookies did Mary have in the beginning?” Step 2: “How many cookies did Mary eat?” Step 3: “How do you calculate the number of cookies left?” ”

Code example:

If you ask an AI question and find that the answer is not satisfactory, you can add an extra sentence to the dialogue after the question sent to the AI:“Let’s think step by step” to guide the language model’s reasoning process.

For example: You’re trying to learn a new concept with the AI, such as “quantum physics,” and you want it to generate some explanations. You can say “Let’s think step by step: explaining quantum physics”.

02. Auto-CoT

Automatically generate CoT prompts (LLMs self CoT): Imagine that instead of teaching LLMs how to think, an AI assistant that can continuously write CoT prompts for you and feed back LLMs can greatly save developers and researchers’ time and effort, especially when dealing with complex reasoning problems.

It’s an AI that canFind patterns in patterns from the previously provided examplesto automatically apply these templates to the new problem. It’s like the AI “references” its own previous experiences, allowing its prompts to adapt to new situations, resulting in a “self-prompting” effect to some extent.

With Auto – CoT technology, AI systems can solve problems that even the most experienced NLP engineers struggle to understand. For example, AI can debug complex code line by line and explain its reasoning process at every step, or use a clear and transparent chain of thought to analyze the dynamics of financial markets.

CoT technology allows AI systems to continuously learn and get better. It helps AI find shortcomings and gradually improve its approach by analyzing its own reasoning process and results. suchAI can continue to advance like humans, laying the foundation for a new generation of AI systems that “learn for life.”

The system card released on the first day of Open AI’s 12-day fragmented live broadcast also mentioned that the model comes with CoT:

The link to the paper is here, if you are interested, you can click to read the full text:

https://cdn.openai.com/o1-system-card-20241205.pdf

When I wrote this article, Deepseek was not so popular, and then Deepseek became popular, and Deepseek fully displayed the chain of thought of reasoning/thinking of the large model, and the power of thinking was really powerful.

03.Demonstrate the “phases” of CoT – the loading process

AI Loading Process: Show the “stages” of CoT, when we are talking to AI, if possibleSee how far AI has goneIt can greatly improve our trust in AI output content, and can also be used as an intermediate prompt to avoid no feedback or too slow feedback when encountering slower output scenarios. Therefore, the loading process before the output content of the large model is a very necessary design.

I think Minimax has done a very good job in this regard from the beginning, and here is an example of Minimax.

Each step in the following loading is based on the thinking steps needed to answer the user’s query, and I also tried several times before the interception was successful, and there were a few states that were still not intercepted because they were too fast, but this also indicates that the output speed will not be slowed down because there are too many loading states.

“I’m doing my best to search”

“Reading”

Complete Search

Finally, “inform me that the following content is from xxx quotes”

(This step is available in most AI conversation products that support networking)

There are many interesting directions about the loading design of AI dialogue, and Kimi has a loading design for computing scenarios before, “press the computer” is very interesting!

I also tried to ask ChatGPT to answer this question, after all, it is not as big as Deepseek hahaha

But you can see the loading design of this: “Reasoning”

In fact, I remember that Chatgot did quite detailed design in the loading section at the beginning, with a lot of status displays, and after a few updates, I couldn’t see those cute loading design details.

Finally, a hidden product that idoubi, a well-known independent developer in the AI industry, has made, is a multilingual AI search engine, BiLin.ai, I have always thought that BiLin’s loading design is great, you can see how far the AI helps you execute, effectively alleviating the problem that search and reasoning complex problems take too long. (www.bilin.ai)

Of course, in addition to the loading effect of dialogue, there is also a loading design for image generation:

ChatGPT Images:

Gemini Graph: The graph model used in loading

There are also many ingenious designs in raw picture loading, waiting for you to dig slowly!

Similar in the interaction between users and AIInform the current thinking process and thinking of the modelI think this is why the display of Deepseek’s reasoning process can make a qualitative leap in the user increment of AI dialogue products.

That’s it, the next sharing will be very interesting!

Reference links:

https://bilin.ai/zh-CN

https://chat.minimaxi.com/

https://www.vellum.ai/blog/chain-of-thought-prompting-cot-everything-you-need-to-know

https://learnprompting.org/ru/docs/intermediate/chain_of_thought

https://www.woshipm.com/aigc/6126239.html

https://blogs.novita.ai/chain-of-thought-prompting-elicits-reasoning-in-large-language-models/

End of text
 0