The revolution of big model reasoning allows AI to bid farewell to the "hallucination" era!

The innovative breakthrough of AI reasoning technology makes model reasoning more reliable and transparent!
Core content:
1. Three main innovations proposed in the paper: knowledge graph, RAG and pseudo-procedural prompts
2. Chain thinking generation driven by knowledge graph to improve reasoning reliability and explainability
3. Learnable knowledge case RAG and pseudo-procedural prompt execution to reduce logical errors and ambiguity
❝To sum it up in one sentence: When the big model starts to learn to use knowledge graphs as "scaffolding", RAG as "external knowledge base", and pseudocode as "anti-slacking progress chart", reasoning will no longer be free, and my mother will no longer have to worry about my hallucinations!
Phase 1: Identifying core concepts
1. Analysis of the main contributions of the paper
Judging from the content of the paper, it mainly proposes three innovations or improvements, each of which revolves around how to make large language models more reliable and controllable in complex reasoning, and how to improve reasoning accuracy and execution efficiency while maintaining interpretability.
Knowledge Graph-driven CoT Generation
In the paper, experts first build a "coarse-grained" decision tree in the target field, and then use a large language model to break down the decision tree into a knowledge graph. The purpose of doing this is to allow the model to have a controllable and explainable "skeleton" or "scaffolding" during the reasoning process of complex problems, rather than relying solely on the LLM's own spontaneous reasoning chain. In this way, the authors hope to reduce the "hallucination" phenomenon of large models and improve the reliability of inference.
Learnable Knowledge Case-aware RAG
Based on the knowledge graph, the idea of retrieval-augmented generation is incorporated. It can retrieve the corresponding sub-cases or sub-descriptions for the longer descriptions or cases entered by the user and fill them into the knowledge graph. This allows the model to "see" facts or information that are closer to the current problem when reasoning, thereby reducing the probability of the model having logical inaccuracies or factual errors. In addition, the paper proposes that these "knowledge cases" can also be dynamically updated, further enhancing the scalability of the model when facing different fields or new problems. Pseudo-Program Prompting Execution
Traditional chain thinking (CoT) often uses natural language to describe intermediate reasoning steps, which can easily lead to ambiguity or interference. The paper advocates the use of a "pseudo-program" format, which is similar to the code structure but does not rely on a real programming language interpreter, and writes the entire reasoning process as a "step-by-step program." This approach can reduce the uncertainty brought by natural language while ensuring readability and improving the traceability and consistency of the reasoning process. Conversion from decision tree to knowledge graph
The paper mentions that a "coarse-grained" decision tree is first built, and then a large model is used to "disassemble" it into a more detailed structure and convert it into a knowledge graph. How to understand this "disassembly" process and how to map the decision logic to the graph structure is critical to understanding the subsequent reasoning model. Integrating RAG retrieval ideas into knowledge graph
Usually we regard retrieval augmented generation (RAG) as a mechanism of "finding information from external corpus or database", but the paper embeds this idea into the knowledge graph and emphasizes the use of LLM to extract related descriptions. How to retrieve "sub-cases" or "sub-descriptions" and assign them to relevant nodes in the knowledge graph is a less intuitive step. Pseudo-Program prompts and execution
Natural language prompts often cause the model to output a bunch of text similar to the human thought process, but this paper emphasizes the use of a "pseudocode" structure to unify the reasoning process. How to maintain a balance between "readability" and "logical rigor" in this "pseudo-program" is a difficult point. It is also important to note that it does not actually run Python or C++, but allows the model to "pretend" to perform each step of reasoning in a programmatic manner. The step of converting the decision tree provided by the expert → LLM into a knowledge graph solves the problem of "how to make the reasoning of the large model have a fixed logical framework". Knowledge Graph + RAG → Get sub-information from external or input text and fill it in. This step deals with “how the model finds specific knowledge or facts when needed” and incorporates this information into the nodes of the knowledge graph. Pseudo-programming tips → Convert the knowledge graph into an executable reasoning process. In this step, all nodes and dependencies are written in a program-like form, allowing the large model to complete the reasoning strictly according to the steps. The most prominent core concepts of the paper that require in-depth explanation are concentrated in the two major areas of "knowledge graph-driven reasoning" and "pseudo-procedural prompts" . The difficulty lies mainly in how to combine them with the original "Chain of Thought (CoT)" model and "Retrieval Augmented Generation (RAG)", and their execution methods are significantly different from the traditional "natural language reasoning chain". The relationship between these concepts can be simply understood as follows: first, decision trees and knowledge graphs are used as the skeleton, combined with retrieval to enhance and improve information, and then all reasoning steps are executed in a "pseudo-programmed" form. Daily scenarios/activities : Imagine you want to build a house on an empty lot, but the house is not built all at once. Instead, a rough blueprint is designed by an "architect" (decision tree), and then a "construction contractor" refines the blueprint into a detailed construction drawing (knowledge graph), and each detail may require additional materials or information during construction (RAG part). Finally, when the construction officially starts, the construction party will follow the "programmed" construction schedule step by step (pseudo-programmed prompts), so as to complete the house building task efficiently and in an orderly manner.
Why choose this metaphor :
A "coarse-grained decision tree" is like a blueprint that only shows the main areas: where the main frame is, where the door is, and where the windows are. The “knowledge graph” is like a more detailed construction drawing with nodes and dependencies: Which step must be completed before the next step? Where do you need to use steel bars? Where do you need to use cement? Retrieval-augmented generation (RAG) is equivalent to retrieving bricks, tiles or new design materials from external warehouses or markets when you find that some bricks, tiles or new design materials are needed during construction, and adding them to the detailed design of the house. “Pseudo-procedural prompts” are like a complete and clear project schedule (or construction manual), which lists each key task as executable steps to ensure that all workers (here metaphorically represented as the internal reasoning process of the model) will not be confused or miss anything during the construction process. Blueprint (coarse-grained decision tree)
In the paper: This is a tree-like logical structure constructed by experts in a specific field, with each node representing a key issue/decision. In metaphor: the blueprint only tells you the general layout of the house, but does not draw the detailed dimensions of the doors and windows, how much steel bars are needed for each wall, etc. Construction drawing (knowledge graph)
In the paper: LLM splits the coarse-grained decision tree into multiple finer entities (nodes) and dependencies (edges) to form a knowledge graph. In metaphor: the construction drawings are accurate to the height and width of each room, as well as the dependency relationship between the construction of each part, so that the construction team knows specifically "which part to do first and which part next". Temporary deployment of materials (search in RAG)
In the paper: If additional facts or contextual information is needed during the reasoning process, LLM will be used to retrieve it and fill the sub-description or sub-case into the corresponding knowledge graph node. In metaphor: If it is found during construction that the size of the door does not match the original drawing, it is necessary to go to the warehouse or market (external knowledge base) to get the correct size or new materials and update them to the construction drawing. Construction schedule (pseudo-programmed prompts)
In the paper: The entire knowledge graph is converted into a "pseudocode" form, allowing the model to step by step execute sub-questions, sub-answers, and finally output the results. In metaphor: A construction schedule lists all tasks into steps that can be completed sequentially, ensuring that the construction team does not jump into the wrong order or overlook certain details. Building a house has an inevitable process of “rough design first → refinement → external materials required for construction → execution in stages”, which is highly similar in structure to the method proposed in the paper. Each node (whether it is a room in a house or an entity in the knowledge graph) has a logical order of "depending on the completion of the previous link before continuing", which is consistent with the core idea of the paper. From decision tree to knowledge graph
A human expert (equivalent to an "architect") first gives a "coarse-grained decision tree", which is then automatically decomposed into multiple finer entities and relationships using LLM to form a visual and executable knowledge graph. Key steps : Each "rough" node will be decomposed into several sub-questions or sub-attributes (called Sub-question, Sub-case, etc. in the paper) by LLM, and connected in the graph with edges such as "Answer Provision" according to the dependency relationship. RAG Search
When the user enters a longer text description, LLM will combine the various sub-questions in the knowledge graph, extract the corresponding sub-descriptions from the text, and fill them into the knowledge graph nodes. Key steps : Match or search the “sub-question” with the input text, get the corresponding description, and then assign the result to the “Sub-description” in the figure. Pseudo program execution
The knowledge graph is serialized into a piece of prompt text that looks like a "program" (Pseudo-Program Knowledge Graph, PKG), which contains what each child node should do, what information it depends on, the execution order, etc. Key steps : The model "processes" each node in order from top to bottom until the final output. Because it is a "pseudo-program", it does not rely on a real compiler, but allows LLM to follow this format itself to reduce unnecessary ambiguity in natural language. Decision tree to knowledge graph = blueprint to construction drawing
If there are more rooms on the construction drawing, it means more details need to be drawn; similarly, at the algorithm level, if there are more nodes, it will take more time to deal with disassembly, filling in information, etc. RAG Retrieval = Timely Purchase or Retrieval of Materials
During the construction process, when it is found that some special parts are needed or additional supplements are needed due to local conditions, it is necessary to go to the market (external database) to purchase or search; in the method of the paper, the required sub-descriptions are similarly retrieved through LLM and filled into the knowledge graph. Pseudo-process execution = step-by-step construction according to the construction schedule
Once all the materials and design details are ready, workers will proceed in the order of "Step 1: Lay the foundation → Step 2: Build the walls → Step 3: Install the roof..."; similarly, the paper serializes the knowledge graph into "pseudocode" to allow LLM to strictly "start one step at a time" like reading a project schedule, thereby reducing confusion and errors. Regarding time complexity = the manpower and material resources required for house construction will also increase linearly
If the number of house nodes (rooms) increases from 3 to 30, more construction drawing details and more process execution time will be required; in the paper, this is also a linear expansion process. Although “building a house” can help readers understand modularity, dependency order, and information retrieval, it cannot fully reflect the language characteristics and uncertainty of LLM during reasoning; In real engineering practice, construction teams will not have "hallucinations", but LLM may fabricate non-existent information; the paper uses the knowledge graph + RAG method to minimize this "confusion" of large models. Therefore, the metaphor only helps readers understand the flow of logical structure and dependencies, and is not equivalent to the diverse problems faced in actual programming or language models. Core connection : Whether it is "decision tree to knowledge graph" or "pseudo-procedural prompts", the essence is to allow LLM to have a more stable, controllable and explainable "construction route" when performing multi-step reasoning. The effect of metaphor : Through the metaphor of "building a prefabricated house", readers can more intuitively understand why it is necessary to have a rough design (decision tree), then make refinements (knowledge graph), obtain materials from the outside (RAG), and finally execute step by step according to the project schedule (pseudo-program). The most critical mathematical principle : The paper uses linear time complexity It expresses that when the scale of the knowledge graph expands, the overall reasoning time of this method will also increase linearly, which is the same as the increase in the number of rooms leading to a longer construction period. Experts provide decision trees that readers can view as the initial "rough design blueprint". For example, an expert built a simple decision tree in the field of "transportation problem": ❝
Node 1: asks "What is the target number of items to be transported?" Node 2: asks "How many items can be transported each time?" Node 3: outputs "How many trips to transport?"
Entity1 (Node 1) is responsible for obtaining the “total number of items” Entity2 (node 2) is responsible for obtaining "how much can be moved at one time" Entity3 (Node 3) calculates the total number of trips based on the answers of Entity1 and Entity2 The user enters a long text description, for example, the user describes: "Roger wants to move 12 plates, but can only move 4 at a time", and some scenario details. The pseudo-program generation system serializes the above knowledge graph into a "pseudo-code", in which each node is a sub-function or an execution module. For example: # Sub-question 1: Get the total number of items
total_items = 12
# Sub-question 2: Get the number of items that can be transported each time
items_per_trip = 4
# Sub-question 3: Calculate the total number of trips
total_trips = total_items / items_per_trip # = 3
print( "The final number of trips required is: " , total_trips)Although LLM "executes" the pseudocode in node order and is not actually executed by the Python or C++ interpreter, the model "thinks" line by line and generates the corresponding answer, finally outputting "3 trips". Decision Tree → Knowledge Graph
Output : initial pseudo-programmed knowledge graph (not yet bound to specific values). Input to the next step : knowledge graph structure (including sub-questions and sub-dependencies). RAG Search
Input : user text (including key information) + sub-questions in the knowledge graph. Output : Fill the specific descriptions (numbers, facts) extracted from the user text into the knowledge graph nodes to form a knowledge graph of "bound data". Pseudo program execution
Input : A complete knowledge graph populated with data. Output : The final answer to the target question (such as "a total of 3 trips are required").
In summary, the three main innovations of the paper all point to one core goal: when performing multi-step reasoning in large language models, the three mechanisms of "knowledge graph" + "RAG" + "pseudo-program" can not only ensure the correctness of the reasoning chain, but also make the reasoning details clear and transparent.
2. Identification of Difficulties in Understanding
From the overall content of the paper and the experiments given by the author, it can be seen that there are several key concepts that are crucial to understanding the entire method and are relatively abstract or confusing:
Among the three key concepts mentioned above, the two parts of "decision tree → disassembly and structuring of knowledge graph" and "pseudo-procedural chain thinking execution" are usually the main difficulties that readers will encounter when understanding, and require special attention.
3. Concept Dependencies
Based on the three innovative points of the paper, their relationship can be simply sorted out in the following order:
Therefore, in the subsequent more in-depth explanations and developments, the most appropriate entry point is often the process of "first understanding how decision trees are converted into knowledge graphs" , and then naturally transitioning to "how to perform retrieval enhancement on knowledge graphs", and finally understanding how "pseudo-procedural prompts" execute the results of the previous two steps.
Summary of Phase I
Next, if readers want to deeply grasp the ideas of the paper, they need to first have a clear understanding of the "correspondence between decision trees and knowledge graphs" and the specific forms of "pseudo-program prompts".
❝Tip: The next step (stage 2) will go into depth on the most challenging or least intuitive concepts, and use life-like metaphors and correspondence to actual technical details to help readers gain a clearer understanding. Later (stage 3), a more detailed process description will be used to help readers understand how the complete solution proposed in the paper transforms input into final output step by step.
Phase 2: In-depth explanation of core concepts
In this phase, we will provide a more in-depth explanation of the two most challenging concepts mentioned in the first phase: the conversion of decision trees to knowledge graphs and pseudo-procedural prompts . To help readers understand, we first use a life-like metaphor to intuitively demonstrate the core mechanisms of these concepts, then match the metaphor with the actual technical content in the paper, and finally combine the only nearly formalized content in the paper (time complexity analysis) to explain the technical details.
1. Design life metaphors
Metaphor theme: Build a "assembled house" that is completed in steps
2. Establish a correspondence between metaphors and actual technology
The following lists the key elements of the metaphor and explains their correspondence with the main technical concepts in the paper:
Why is the correspondence reasonable?
3. Dive into technical details
Next, we transition from this house metaphor to the actual technical principles in the paper. The core process of the paper mainly includes the following points:
3.1 “Formulas” or algorithms in papers
This paper does not provide a complete mathematical equation, but an estimate of the time complexity of the overall process is given in Appendix A.1. We can regard it as the closest thing to the "original formula" in the paper:
❝Original mathematical form
in Represents the total number of nodes in the decision tree (or knowledge graph), indicating that the overall running time is linearly related to the number of nodes.
❝Natural language description after symbol replacement "The running time of the entire method increases linearly with the number of nodes in the knowledge graph."
In other words, if the number of rooms (nodes) in the house construction analogy increases, the entire construction schedule will also become longer and the time required will increase linearly.
4. Map technical details to metaphors
Back to the scenario of "building a modular house", we can correspond to each technical point like this:
The Limitations of Metaphor
5. Conclusion
The above is the in-depth explanation of the core concepts in the second stage. Next, in the third stage, we will combine this understanding to describe in detail how the complete model or solution proposed in the paper processes the input information step by step and obtains the final result. At that time, a more process-oriented description will be provided to facilitate readers to truly "reproduce" this idea.
Phase 3: Detailing the process steps
This stage will provide a more specific and process-oriented description of the complete model or solution proposed in the paper, helping readers to restore the method step by step from input to output. It will be presented in pseudocode form to ensure that readers can reproduce the core process based on this description without reading the original paper.
1. Specific process for handling problems
The following description is divided into three main steps, corresponding to the three modules of the paper (knowledge graph drive, RAG retrieval, and pseudo program execution). Here we take an example "calculating how many trips it takes for a person to move all the items on the table" as an example to illustrate the key processing process from input to output.
1. Graph-driven CoT generation: from decision trees to knowledge graphs
2. Learnable Knowledge Case RAG: Retrieve Filling Information
Pseudo-procedural prompt execution: Calculate and output results in sequence
Through the above three steps, readers can see: 1) First use "expert decision tree" + "LLM disassembly" to generate a knowledge graph, 2) perform "RAG search" on user input and fill in entities, 3) convert the knowledge graph into a "pseudo-program" for LLM to execute in sequence and obtain results.
2. Input and output connection in the process
Throughout the process, the output of each step can naturally serve as the input for the next step:
This "interlocking" structure allows readers to intuitively check or modify the reasoning process through a series of intermediate products (each node in the graph, search results, pseudo-program text), achieving explainable and controllable multi-step reasoning.
3. Process Pseudocode Example
The following example combines the core ideas proposed in the paper and gives a "high-level pseudo code". Readers can rewrite it into Python, C++ or other language versions for use in actual systems:
# -----------------------------------------
# Initialization: Knowledge Graph Driven CoT Generation
# -----------------------------------------
function KnowledgeGraphDrivenCoTGeneration(field, expert_modify):
decision_tree = ExpertBuildDecisionTree(field)
knowledge_graph = LLMDecompose(decision_tree) # Decompose the coarse-grained decision tree into a graph
initial_pkg = LLMGeneratePseudoProgram(knowledge_graph)
if expert_modify:
initial_pkg = ExpertModify(initial_pkg)
return initial_pkg
# -----------------------------------------
# Step 2: Learnable Case-Based RAG
# -----------------------------------------
function KnowledgeCaseAwareRAG(initial_pkg):
user_description = GetUserInput() # Get long text from the user
updated_pkg = LLMExtractSubDescriptions(initial_pkg, user_description)
return updated_pkg
# -----------------------------------------
# Step 3: Pseudo program execution
# -----------------------------------------
function PseudoProgramExecution(updated_pkg):
final_answer = LLMExecutePseudoProgram(updated_pkg)
return final_answer
# Main process: overall call
function CoT_RAG_Main():
# 1) Knowledge Graph
pkg_stage1 = KnowledgeGraphDrivenCoTGeneration(field= "carry_problem" , expert_modify= False )
# 2) RAG search and fill
pkg_stage2 = KnowledgeCaseAwareRAG(pkg_stage1)
# 3) Pseudo-programmed execution
answer = PseudoProgramExecution(pkg_stage2)
print( "Final answer: " , answer)
explain :
KnowledgeGraphDrivenCoTGeneration
: Starting from the decision tree constructed by domain experts, an "initial pseudo-program" containing all sub-problems and dependencies is generated with the help of LLM.KnowledgeCaseAwareRAG
: "Search" the user input and put the necessary sub-descriptions into the corresponding sub-question "slots".PseudoProgramExecution
: Let the big model "execute" these sub-questions step by step and output the final answer.The inputs and outputs of different steps are clearly connected, which facilitates later debugging or the addition of more functions (such as new domain knowledge, more retrieval sources, etc.).
Through such a complete step-by-step process, readers can understand the whole process of the method from building a decision tree, converting it into a knowledge graph, to retrieval and filling, and finally executing the pseudo program without having to read the original paper in advance. Each step emphasizes interpretability, controllability, and scalability , and has strong operability and versatility for actual large-scale language model multi-step reasoning tasks.