Interpretation of CoT thinking chain technology and introduction of ToT, GoT, PoT and other prompt word engineering frameworks

Written by
Jasper Cole
Updated on:June-24th-2025
Recommendation

In-depth analysis of CoT technology and its derived ToT, GoT, PoT and other frameworks, unveiling the mystery behind the reasoning capabilities of large models.

Core content:
1. The hot attention of DeepSeek R1 reasoning model and its core CoT technology
2. The combination of prompt words and thought chains to improve the problem-solving ability of large models
3. The classification and composition of thought chains, from zero samples to the gradual deepening of reasoning examples

Yang Fangxian
Founder of 53A/Most Valuable Expert of Tencent Cloud (TVP)

DeepSeek R1 has received a lot of attention in 2025. Unlike previous generative models such as the GPT series, Wenxin Yiyan or Tongyi Qianwen, it is a reasoning model that greatly improves the ability of large models to solve complex problems. DeepSeek R1 can reason because it implements Chains of Thoughts ( CoT ) in the model . The concept of Chain of Thoughts was originally proposed by Jason Wei and Xuezhi Wang , senior researchers at Google Brain , and was elaborated in the January 2022 paper " Chain-of-Thought Prompting Elicits Reasoning in Large Language Models " (Chinese translation see "Why DeepSeek Large Model Can Think Deeply? It Turns Out That Chain of Thought Prompting Elicits Reasoning in Large Language Models" ) . This article explains the CoT chain of thought technology in detail and introduces the prompt word engineering frameworks such as ToT , GoT , and PoT that have evolved from CoT .

01 Prompt words and thought chain


We know that prompts are questions, instructions or requests sent by users to the large language model. They are used to clearly tell the model what problems the user wants to solve or tasks the user wants to complete . They are the basis for the large language model to understand user needs and generate relevant and accurate answers or content accordingly.


In the prompt word mode, the user interacts with the big model in the following way: "ask a question - return an answer" . That is, the user uses the prompt word to ask the big model a question, and the big model directly generates and returns the answer. In this mode, the big model mainly uses the knowledge internalized in the early pre-training to answer. However, for some complex questions, the generative model + simple use of prompt words cannot get accurate and useful answers. For example, for a question like "Xiao Ming has 70 yuan, which is twice as much as Xiao Li, 8 yuan less . How much does Xiao Li have?", the big model may make up an answer.


The characteristic of a large model is that you need to give it time to think. The answer obtained after long thinking is more accurate. Adding a chain of thought can make the large model think more deeply. Chain of Thought CoT) refers to the process of breaking down a logically complex problem and forming a complete thinking process through a series of logically related thinking.


After adding the thought chain, the interaction between the user and the big model becomes: "ask a question - reasoning steps - return the answer". A step-by-step reasoning process is added between the question and the answer, gradually approaching the truth of the problem.


02Classification  and composition of thought chains


Therefore, we add a requirement in the prompt: Let's think step by step . In this way, the big model will think about the problem step by step and give an answer. This is the simplest kind of thinking chain. Using a prompt " Let's think step by step " to let the big model generate its own thinking chain is called Zero -Shot-CoT . However, the thinking chain generated in this way may be different from what we expected.

The big model is like a human. If you tell it an example of human reasoning, that is, how you think about reasoning step by step, it will be easier for it to understand how to reason. In the example below, an example of reasoning is given. As you can see, without the step-by-step reasoning example and only with the prompt words, the big model cannot give the correct answer. But with the step-by-step reasoning example, the big model also follows suit, thinking about the problem step by step, and gives the final answer.



The chain of thought with reasoning examples is called Few -Shot-CoT . The chain of thought with samples can better stimulate the potential of large models and improve the model's capabilities without additional training.

A complete prompt word containing a chain of thought mainly consists of three parts: instruction , rationale , and exemplars . Instructions are used to describe the problem and inform the output format of the large model. Rationale refers to the intermediate reasoning process of  CoT  , which can include the solution to the problem, the intermediate reasoning steps, and any external knowledge related to the problem. Exemplars refer to the basic format of providing input-output pairs for the large model in a small number of samples. Each example includes: problem, reasoning process, and answer.


03The  role of thinking chain


The thinking chain has important value and significance for the promotion and application of large models.


1. Enhanced the reasoning ability of large models. With the thinking chain, the reasoning ability of large models is greatly enhanced, and more complex problems can be solved step by step.


2. Improved the interpretability of large models. At the same time, with the thought chain, users can observe the step-by-step thinking process of the large model, which improves the interpretability of the large model. The large model is no longer a black box, and users have a higher degree of trust in the output results of the large model. This is very critical for some serious and important scenarios.


3. Make the big model more controllable. By using prompt words containing thought chains, users can effectively influence the problem-solving process of the big model, and no longer accept the results given by the big model helplessly.


04Thinking  chain in the reasoning model


The reasoning model is equivalent to internalizing the thought chain technology into the big model. In other words, the reasoning model can accept ordinary prompt words and automatically generate thought chains. The automatic generation of thought chains is further divided into the automatic generation of instructions, the automatic generation of logical basis, and the automatic generation of examples. Therefore, for the reasoning model, the prompt words can be simpler, and the complexity is left to the big model.


Automatic instruction generation includes automatic  prompt  engineering ( APE ) and prompt optimization ( OPRO ). The core principle is to observe the performance of each candidate prompt in the actual task and select the prompt with the best performance .

The automatic generation of logical basis is mainly CoT-SC ( Chain-of-Thought-Self-Consistency ). CoT-SC , i.e. Chain-of-Thought-Self-Consistency, is a continuation ofthe CoTidea. This methodautomatically builds multiple reasoning paths when responding to queries, starts concurrent reasoning,and evaluates and assigns different weights to each reasoning path before finally determining the answer, and finally selects the most effective and coherent chain of thought.



The example automatic generation technology is represented by Auto-CoT . Specifically, Auto-CoT  is divided into two stages: ( 1 ) problem clustering, clustering the task dataset ( 2 ); example sampling: selecting a representative problem from each cluster center and using  Zero-Shot-CoT  to generate a thought chain as an example.


05 Other prompt word engineering framework

The chain of thought CoT is mainly linear, with multiple reasoning steps connected into a chain. Based on the chain of thought, multiple reasoning modes such as ToT , GoT , and PoT are derived . These, like CoT, belong to the category of prompt word engineering.

1.ToT ( Tree-of-Thoughts )


ToT is a tree-like chain of thoughts that allows backtracking and exploring multiple branches of reasoning from a basic idea. Each node on the tree is called a "thought", a coherent sequence of language, and a step towards the final answer.


The strength of ToT is its methodical organization. First, the system breaks down a problem and generates a list of potential reasoning steps, or "thoughts," that can be considered. Then, these ideas are evaluated, and the system measures the likelihood that each one will produce the desired solution.



Trees are important data structures in computer science. In ToT , in order to help the model identify the most effective thinking sequence, the system uses commonly used search algorithms, such as breadth-first search ( BFS ) and depth-first search ( DFS ).


As you can see, CoT can be used to enforce a clear and unique sequence of thoughts, while ToT can explore multiple possible sequences of thoughts. CoT is actually a special case of ToT , which is more flexible and adaptable.


2. GoT ( Graph-of-Thoughts )


The GoT framework further evolves the tree structure into a directed acyclic graph ( DAG ). Each idea can be a vertex in the graph. Self-loops or aggregations can appear in the graph. Self-loops can consolidate a specific idea or aggregate multiple ideas into a coherent idea.


The directed edges in the graph describe the interdependencies between these ideas. Specifically, if an edge extends from idea t1 to t2 , it means that t2 is conceived based on t1 .


Graph-of-Thoughts, source: Besta et al. (2023)


The characteristic of GoT is that it can transform various ideas to further improve the reasoning process. The main changes include: ( 1 ) aggregation, which is to merge several ideas into a unified idea; ( 2 ) refinement, which is to continuously iterate a single idea to improve its precision; ( 3 ) generation, which is conducive to generating new ideas from existing ideas.


In addition, GoT introduces an evaluation dimension to evaluate each individual idea through scoring and ranking. The system grades these ideas based on the scores, which is very useful for determining which ideas are worth prioritizing or implementing.


3.PoT ( Program-of-Thoughts )


PoT is to formulate the reasoning process behind the question and answer into an executable program ( Program ), and use the program interpreter output as part of the final answer.


Program of Thought ( PoT ) is a unique LLM reasoning method. Rather than just generating natural language answers, it requires creating an executable program that can be run on a program interpreter such as Python to produce actual results. In this way, PoT 's expression is clearer and more accurate, especially for mathematical logic problems that require numerical calculations.


It is important to note that the PoT program execution is not necessarily for the final answer, but can be part of the intermediate steps to the final answer.


The figure below is a comparison of the two reasoning frameworks, CoT and PoT .



06  Conclusion


Prompt word engineering frameworks such as CoT , ToT , GoT , and PoT have greatly improved the reasoning capabilities of large models, allowing us to use large models to solve more complex problems, improving the interpretability and controllability of large models, and laying the foundation for the expansion of large model applications.