# US 2026/0064797 A1 · Method and apparatus for efficacious tree search for llm

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064797 A1
- Document ID: US20260064797A1
- Status: Published application
- Kind: A1
- Application number: 18/817,916
- Filed: 2024-08-28
- Published: 2026-03-05
- Earliest claimed: 2024-08-28
- Assignees: Tencent America LLC
- Applicants: Tencent America LLC
- Inventors: Linfeng SONG
- Web page: https://patentgrep.com/patent/US20260064797A1

## CPC

- G06F 17/11: for solving equations {, e.g. nonlinear equations, general mathematical optimization problems (optimization specially adapted for a specific administrative, business or logistic context G06Q10/04)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A method includes: receiving a text string corresponding to a mathematical question; generating a search tree comprising a plurality of nodes by inputting the text string into a large language model (LLM) N different times, wherein the text string is the root of the search tree, wherein each node other than the root node corresponds to a search trajectory related to the mathematical question, wherein N is an integer greater than zero; determining an expansion score to each node from the plurality of nodes; selecting a node from the plurality of nodes having a highest expansion score; determining a budget for expanding the selected node; expanding the selected node in accordance with the budget by inputting the node and the mathematical questions into the one or more mathematical tasks.

## Claims

### Claim 1

A method performed by at least one processor, the method comprising:
receiving a text string corresponding to a mathematical question;
generating a search tree comprising a plurality of nodes by inputting the text string into a large language model (LLM) N different times, wherein the text string is the root of the search tree, wherein each node other than the root node corresponds to a search trajectory related to the mathematical question, wherein N is an integer greater than zero;
determining an expansion score to each node from the plurality of nodes;
selecting a node from the plurality of nodes having a highest expansion score;
determining a budget for expanding the selected node; and
expanding the selected node in accordance with the budget by inputting the node and the mathematical questions into the one or more mathematical tasks.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the expansion score of the selected node is based on an expected degree of success that the respective node corresponds to a correct answer to the mathematical question.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the expansion score of the selected node is based on a progress term corresponding to a ratio between a number of steps of the selected node from the root node and a number of steps corresponding to a greedy decoded trajectory.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the budget for the selected node is determined based on an expected accuracy, a number of steps of the selected node from the root node, and an upper bound of the budget.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the expanding the selected node comprises expanding the search tree incrementally in which the selected node and each created node from the selected node is input into the LLM until with the mathematical question until the budget is utilized.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the expanding the selected node comprises simultaneously expanding the selected node in which the selected node is input into the LLM with the questions a predetermined number of times in accordance with the budget.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the selecting the node and the expanding the selected node are iteratively performed until a predetermined condition is satisfied.

### Claim 8 (depends on 7)

The method according to claim 7, wherein the predetermined condition specifies that the search tree includes an answer that is equal to or greater than an expected accuracy threshold.

### Claim 9 (depends on 7)

The method according to claim 7, wherein the predetermined condition specifies that a number of iterations reaches a predetermined limit.

### Claim 10

An apparatus comprising:
at least one memory configured to store program code; and
at least one processor configured to read the program code and operate as instructed by the program code, the program code including:
receiving code configured to cause the at least one processor to receive a text string corresponding to a mathematical question;
generating code configured to cause the at least one processor to generate a search tree comprising a plurality of nodes by inputting the text string into a large language model (LLM) N different times, wherein the text string is the root of the search tree, wherein each node other than the root node corresponds to a search trajectory related to the mathematical question, wherein N is an integer greater than zero;
first determining code configured to cause the at least one processor to determine an expansion score to each node from the plurality of nodes;
selecting code configured to cause the at least one processor to select a node from the plurality of nodes having a highest expansion score;
second determining code configured to cause the at least one processor to determine a budget for expanding the selected node;
expanding code configured to cause the at least one processor to expand the selected node in accordance with the budget by inputting the node and the mathematical questions into the one or more mathematical tasks.

### Claim 11 (depends on 10)

The apparatus according to claim 10, wherein the expansion score of the selected node is based on an expected degree of success that the respective node corresponds to a correct answer to the mathematical question.

### Claim 12 (depends on 10)

The apparatus according to claim 10, wherein the expansion score of the selected node is based on a progress term corresponding to a ratio between a number of steps of the selected node from the root node and a number of steps corresponding to a greedy decoded trajectory.

### Claim 13 (depends on 10)

The apparatus according to claim 10, wherein the budget for the selected node is determined based on an expected accuracy, a number of steps of the selected node from the root node, and an upper bound of the budget.

### Claim 14 (depends on 10)

The apparatus according to claim 10, wherein the expanding code is further configured to cause the at least one processor to expand the selected node incrementally in which the selected node and each created node from the selected node is input into the LLM until with the mathematical question until the budget is utilized.

### Claim 15 (depends on 10)

The apparatus according to claim 10, wherein the expanding code is further configured to cause the at least one processor to simultaneously expanding the selected node in which the selected node is input into the LLM with the questions a predetermined number of times in accordance with the budget.

### Claim 16 (depends on 10)

The apparatus according to claim 10, wherein the selection of the node and the expansion of the selected node are iteratively performed until a predetermined condition is satisfied.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the predetermined condition specifies that the search tree includes an answer that is equal to or greater than an expected accuracy threshold.

### Claim 18 (depends on 16)

The apparatus according to claim 16, wherein the predetermined condition specifies that a number of iterations reaches a predetermined limit.

### Claim 19

A non-transitory computer readable medium having instructions stored therein, which when executed by a processor cause the processor to execute a method comprising:
receiving a text string corresponding to a mathematical question;
generating a search tree comprising a plurality of nodes by inputting the text string into a large language model (LLM) N different times, wherein the text string is the root of the search tree, wherein each node other than the root node corresponds to a search trajectory related to the mathematical question, wherein N is an integer greater than zero;
determining an expansion score to each node from the plurality of nodes;
selecting a node from the plurality of nodes having a highest expansion score;
determining a budget for expanding the selected node;
expanding the selected node in accordance with the budget by inputting the node and the mathematical questions into the one or more mathematical tasks.

### Claim 20 (depends on 19)

The non-transitory computer readable medium according to claim 19, wherein the expansion score of the selected node is based on an expected degree of success that the respective node corresponds to a correct answer to the mathematical question.
