IP Library › Granted Patent US 12,462,164
Granted Patent B2
US 12,462,164 · App. 18/749,496 · Granted Nov 4, 2025

Modular large language model (LLM) guided tree-of-thought system

Inventors: Jieyi Long (Santa Clara, CA); Mitchell C. Liu (Los Altos, CA)
Assignee: Theta Labs, Inc.
G06N3/098G06N3/096
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,462,164
App. No.
18/749,496
Granted
Nov 4, 2025
Kind
B2
Abstract

A tree-of-thought (ToT) system is presented that improves problem-solving capabilities of machine learning models, such as auto-regressive large language models (LLMs). The TOT system can solve complex reasoning tasks through trial and error. In this process, the system explores the solution space through a tree-like thought process, allowing for backtracking when necessary. The system augments an LLM with additional modules including a prompter agent, a checker module, a memory module, and a ToT controller. These modules engage in a multi-round conversation with the LLM. The memory module records the conversation and state history of the problem-solving process, which allows the system to backtrack to the previous steps of the thought-process and explore other solution paths. This new system can be applied to a blockchain and/or a distributed computing system.

Claims (114)

1 . A non-transitory computer-readable storage medium having instructions stored therein, which when executed by a processor, cause a problem-solving system to:

retrieve a training dataset for the problem-solving system,

wherein the training dataset comprises pairs of given input and corresponding expected output of the problem-solving system,

wherein each given input is a description of a given problem,

wherein each corresponding expected output is a solution to the given problem,

wherein the problem-solving system comprises a tree-of-thought (ToT) controller, the prompter agent, a memory module, a checker module, and a quizzer module,

wherein the ToT controller comprises a controller policy network, and

wherein the prompter agent comprises a prompter policy network;

generate, using the quizzer module, self-play-based training data for the problem-solving system;

augment the training dataset with the self-play-based training data to generate an augmented training dataset;

train the problem-solving system on the augmented training dataset,

wherein the controller policy network in the ToT controller and the prompter policy network in the prompter agent are trained for a plurality of iterations,

wherein during a first stage of a given iteration, the controller policy network is updated while the promoter policy network is fixed, and

wherein during a second stage of the given iteration, the prompter policy network is updated while the controller policy network is fixed;

receive, using a prompter agent, a problem description of a problem from a user,

generate, using the prompter agent and based on the problem description, a first prompt to a large language model (LLM) to generate a first intermediate solution to the problem;

check, using the checker module, a validity of the first intermediate solution;

store, in the memory module, the first prompt, the first intermediate solution, and the validity of the first intermediate solution, as parts of a conversation and node visit history,

wherein nodes in the conversation and node visit history form a search tree, and

wherein each node in the search tree is associated with a partial solution to the problem;

check, using the checker module, a validity of a current partial solution associated with a current node in the search tree;

determine, using the ToT controller and based on the validity of the current partial solution and the conversation and node visit history, a next node to visit,

wherein the next node to visit is an ancestor node of the current node in the search tree,

wherein the next node to visit is determined by the controller policy network, and

wherein the controller policy network takes as input a position embedding of a sequence of last visited nodes;

query the memory module to retrieve an ancestor partial solution associated with the ancestor node;

generate, using the prompter agent and based on the ancestor partial solution, a second prompt to the LLM to generate a second intermediate solution to the problem,

wherein the prompter policy network takes as input the position embedding of the sequence of last visited nodes;

store, in the memory module, the second prompt and the second intermediate solution, as parts of the conversation and node visit history; and

determine, using the checker module, whether the second intermediate solution is a valid final solution to the problem.

2 . The non-transitory computer-readable storage medium of claim 1 , wherein the determining the next search step by the ToT controller is based on a rule-based backtracking algorithm.

3 . The non-transitory computer-readable storage medium of claim 1 ,

wherein the prompter policy network takes as input a prompt template, the conversation and node visit history, and a set of in-context learning examples, and outputs a prompt for the LLM.

4 . The non-transitory computer-readable storage medium of claim 1 , wherein the checker module comprises a neural network classifier.

5 . The non-transitory computer-readable storage medium of claim 1 , wherein the LLM is implemented on one or more edge nodes in a decentralized blockchain-based network.

6 . The non-transitory computer-readable storage medium of claim 1 , wherein the ToT controller is implemented on one or more edge nodes in a decentralized blockchain-based network.

7 . The non-transitory computer-readable storage medium of claim 6 , wherein the instructions, which when executed by the processor, further cause the problem-solving system to:

in response to determining that the second intermediate solution is a valid final solution to the problem, submit the second intermediate solution to a reward smart contract deployed on a blockchain in the decentralized blockchain-based network; and

receive a reward from the reward smart contract for submitting the second intermediate solution.

8 . The non-transitory computer-readable storage medium of claim 6 , wherein the ToT controller communicates with the memory module and the prompter agent through a peer-to-peer connection on the decentralized blockchain-based network.

9 . The non-transitory computer-readable storage medium of claim 1 , wherein the prompter agent is run on one or more edge nodes in a decentralized blockchain-based network.

10 . The non-transitory computer-readable storage medium of claim 1 ,

wherein the problem description is an instance of a puzzle,

wherein the first intermediate solution is a partial puzzle solution,

wherein the checker module is a rule-based checker of partial puzzle solutions, and

wherein the ToT controller uses a rule-based backtracking algorithm.

11 . The non-transitory computer-readable storage medium of claim 1 , wherein the problem description is an instance of a multi-step problem-solving task, and wherein a plurality of problem-solving steps corresponds to the plurality of last visited nodes.

12 . A method for a problem-solving system, the method comprising:

retrieving a training dataset for the problem-solving system,

wherein the training dataset comprises pairs of given input and corresponding expected output of the problem-solving system,

wherein each given input is a description of a given problem,

wherein each corresponding expected output is a solution to the given problem,

wherein the problem-solving system comprises a tree-of-thought (ToT) controller, the prompter agent, a memory module, and a checker module, and a quizzer module,

wherein the ToT controller comprises a controller policy network, and

wherein the prompter agent comprises a prompter policy network;

generating, using the quizzer module, self-play-based training data for the problem- solving system;

augmenting the training dataset with the self-play-based training data to generate an augmented training dataset;

training the problem-solving system on the augmented training dataset,

wherein the controller policy network in the ToT controller and the prompter policy network in the prompter agent are trained for a plurality of iterations,

wherein during a first stage of a given iteration, the controller policy network is updated while the promoter policy network is fixed, and

wherein during a second stage of the given iteration, the prompter policy network is updated while the controller policy network is fixed;

receiving, using a prompter agent, a problem description of a problem from a user,

generating, using the prompter agent and based on the problem description, a first prompt to a large language model (LLM) to generate a first intermediate solution to the problem;

checking, using the checker module, a validity of the first intermediate solution;

storing, in the memory module, the first prompt, the first intermediate solution, and the validity of the first intermediate solution, as parts of a conversation and node visit history,

wherein nodes in the conversation and node visit history form a search tree, and

wherein each node in the search tree is associated with a partial solution to the problem;

checking, using the checker module, a validity of a current partial solution associated with a current node in the search tree;

determining, using the ToT controller and based on the validity of the current partial solution and the conversation and node visit history, a next node to visit,

wherein the next node to visit is an ancestor node of the current node in the search tree,

wherein the next node to visit is determined by the controller policy network, and

wherein the controller policy network takes as input a position embedding of a sequence of last visited nodes;

querying the memory module to retrieve an ancestor partial solution associated with the ancestor node;

generating, using the prompter agent and based on the ancestor partial solution, a second prompt to the LLM to generate a second intermediate solution to the problem,

wherein the prompter policy network takes as input the position embedding of the sequence of last visited nodes;

storing, in the memory module, the second prompt and the second intermediate solution, as parts of the conversation and node visit history; and

determining, using the checker module, whether the second intermediate solution is a valid final solution to the problem.

13 . The method of claim 12 , wherein the prompter policy network takes as input a prompt template, the conversation and node visit history, and a set of in-context learning examples, and outputs a prompt for the LLM.

14 . The method of claim 12 , wherein the ToT controller is implemented on one or more edge nodes in a decentralized blockchain-based network.

15 . A tree-of-thought (ToT) problem-solving system, comprising:

access to a large language model (LLM);

access to a processor;

a non-transitory physical medium for storing program code executable by the processor, the program code when executed by the processor causing the processor to implement:

a prompter agent comprising a prompter policy network, adapted to generate a prompt for the LLM;

a memory module adapted to store a conversation and node visit history, wherein the conversation and node visit history comprises conversations between the LLM and the prompter agent;

a checker module adapted to determine a validity of a given partial solution associated with a given node in a search tree of a search process;

a quizzer module adapted to generate self-play-based training data;

a ToT controller comprising a controller policy network, wherein the ToT is adapted to direct the search process of the ToT problem-solving system by determining a backtracking policy based on a state of the memory module,

wherein the non-transitory physical medium further stores program code that when executed by the processor causes the ToT controller to:

retrieve a training dataset for the problem-solving system,

wherein the training dataset comprises pairs of given input and corresponding expected output of the problem-solving system,

wherein each given input is a description of a given problem, and

wherein each corresponding expected output is a solution to the given problem;

generate, using the quizzer module, self-play-based training data for the problem-solving system;

augment the training dataset with the self-play-based training data to generate an augmented training dataset;

train the problem-solving system on the augmented training dataset,

wherein the controller policy network in the ToT controller and the prompter policy network in the prompter agent are trained for a plurality of iterations,

wherein during a first stage of a given iteration, the controller policy network is updated while the promoter policy network is fixed, and

wherein during a second stage of the given iteration, the prompter policy network is updated while the controller policy network is fixed;

receive, using a prompter agent, a problem description of a problem from a user;

generate, using the prompter agent and based on the problem description, a first prompt to the LLM to generate a first intermediate solution to the problem;

check, using the checker module, a validity of the first intermediate solution;

store, in the memory module, the first prompt, the first intermediate solution, and the validity of the first intermediate solution, as parts of the conversation and node visit history,

wherein nodes in the conversation and node visit history form the search tree, and

wherein each node in the search tree is associated with a partial solution to the problem;

check, using the checker module, a validity of a current partial solution associated with a current node in the search tree;

determine, using the ToT controller and based on the validity of the current partial solution and the conversation and node visit history, a next node to visit,

wherein the next node to visit is an ancestor node of the current node in the search tree,

wherein the next node to visit is determined by the controller policy network, and

wherein the controller policy network takes as input a position embedding of a sequence of last visited nodes;

query the memory module to retrieve an ancestor partial solution associated with the ancestor node;

generate, using the prompter agent and based on the ancestor partial solution, a second prompt to the LLM to generate a second intermediate solution to the problem,

wherein the prompter policy network takes as input the position embedding of the sequence of last visited nodes; and

determine, using the checker module, whether the second intermediate solution is a valid final solution to the problem.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 21, 2024
From: LONG, JIEYI; LIU, MITCHELL C.
To: THETA LABS, INC.
Reel/Frame 067790/0796 →
Continuity (2)
Provisional Application 63621292 · Jan 16, 2024
Related Publication 20250232187A1 · Jul 17, 2025
References Cited (36)
US 9558748B2 · Lane et al. · 2017 [cited by applicant]
US 11893981B1 · Clark · 2024 [cited by examiner]
US 12051205B1 · Deutsch · 2024 [cited by examiner]
US 20030130849A1 · Durston et al. · 2003 [cited by applicant]
US 20120310618A1 · B'Far · 2012 [cited by examiner]
US 20160196492A1 · Johnson et al. · 2016 [cited by applicant]
US 20180032082A1 · Shalev-Shwartz · 2018 [cited by examiner]
US 20180314951A1 · Sadamasa · 2018 [cited by examiner]
US 20190197402A1 · Kovács · 2019 [cited by examiner]
US 20200344185A1 · Singaraju · 2020 [cited by examiner]
US 20210234668A1 · Manamohan · 2021 [cited by examiner]
US 20220148299A1 · Bonnevie · 2022 [cited by examiner]
US 20220229943A1 · Uy · 2022 [cited by examiner]
US 20220230080A1 · Isele · 2022 [cited by examiner]
US 20240028589A1 · Shatsky · 2024 [cited by examiner]
US 20240078230A1 · Song · 2024 [cited by examiner]
US 20240419803A1 · Blum · 2024 [cited by examiner]
CN 117077791A · 2023 [cited by applicant]
CN 117271729A · 2023 [cited by applicant]
Besta, Maciej, et al. “Graph of Thoughts: Solving Elaborate Problems with Large Language Models.” arXiv preprint arXiv:2308.09687 (Nov. 24, 2023) (Year: 2023). [cited by examiner]
Lu, Pan, et al. “Dynamic prompt learning via policy gradient for semi-structured mathematical reasoning.” arXiv preprint arXiv:2209.14610 (Mar. 2, 2023) (Year: 2023). [cited by examiner]
Gong, Yuanhao. “Dynamic large language models on blockchains.” arXiv preprint arXiv:2307.10549 (2023), pp. 1-5 (Year: 2023). [cited by examiner]
Gao, Yeqi, et al. “Gradientcoin: A peer-to-peer decentralized large language models.” arXiv preprint arXiv:2308.10502 (Aug. 21, 2023), pp. 1-68 (Year: 2023). [cited by examiner]
Hu, Pengbo, et al. “Tree-of-mixed-thought: Combining fast and slow thinking for multi-hop visual reasoning.” arXiv preprint arXiv:2308.09658 (Aug. 21, 2023), pp. 1-16 (Year: 2023). [cited by examiner]
Sel, Bilgehan, et al. “Algorithm of thoughts: Enhancing exploration of ideas in large language models.” arXiv preprint arXiv:2308.10379 (Sep. 28, 2023), pp. 1-43 (Year: 2023). [cited by examiner]
Lin, Zheng-Lin, et al. “Solving Linguistic Olympiad Problems with Tree-of-Thought Prompting.” Proceedings of the 35th Conference on Computational Linguistics and Speech Processing (2023), pp. 262-269 (Year: 2023). [cited by examiner]
Cao, Shulin, et al. “Probabilistic tree-of-thought reasoning for answering knowledge-intensive complex questions.” arXiv preprint arXiv:2311.13982 (Nov. 23, 2023). (Year: 2023). [cited by examiner]
Lei, Bin, et al. “Boosting logical reasoning in large language models through a new framework: The graph of thought.” arXiv preprint arXiv:2308.08614 (Aug. 16, 2023) (Year: 2023). [cited by examiner]
Ranaldi, Leonardo, et al. “Empowering multi-step reasoning across languages via tree-of-thoughts.” arXiv preprint arXiv:2311.08097 (Nov. 14, 2023). (Year: 2023). [cited by examiner]
Hu, Mengkang, et al. “Tree-planner: Efficient close-loop task planning with large language models.” arXiv preprint arXiv:2310.08582 (Oct. 12, 2023). (Year: 2023). [cited by examiner]
Long, Jieyi, “Nakamoto Consensus with Verifiable Delay Puzzle”, Jul. 2021, 20 pages, San Jose, CA, USA. [cited by applicant]
Long, Jieyi, et al., “Scalable BFT Consensus Mechanism Through Aggregated Signature Gossip”, The IEEE International Conference on Blockchain and Cryptocurrency (ICBC), 2019, pp. 360-367, San Jose, CA, USA. [cited by applicant]
Humza Naveed, et al., “A Comprehensive Overview of Large Language Models,” arXiv Preprint, Dec. 27, 2023, 46 pages, United States. [cited by applicant]
Lei Wang, et al., “A Survey on Large Language Model based Autonomous Agents,” arXiv Preprint, Sep. 7, 2023, 35 pages, United States. [cited by applicant]
Shunyu Yao, et al., “Tree of Thoughts: Deliberate Problem Solving with Large Language Models,” arXiv Preprint, Dec. 3, 2023, 14 pages, United States. [cited by applicant]
Jieyi Long, “Large Language Model Guided Tree-of-Thought,” arXiv Preprint, May 15, 2023, 11 pages, United States. [cited by applicant]