# Technical Document Extraction: Tree-of-Thoughts (ToT) Framework
This image illustrates a technical workflow for a Large Language Model (LM) solving a mathematical puzzle (likely the "Game of 24"). The process is divided into two main pipelines: **(a) Propose Prompt** for generating potential next steps and **(b) Value Prompt** for evaluating the viability of those steps.
---
## 1. Component Isolation
### Region 1: Search Tree (Left Side)
This region visualizes a state-space search tree starting from an initial set of numbers.
* **Input:** `4 9 10 13`
* **Root Level:** A dashed grey box represents the initial state.
* **Level 1 (Branching):**
* Left branch: `......` (indicates omitted possibilities).
* Middle branch (Green text): `10-4=6 (left: 6 9 13)`
* Right branch (Red text, dashed orange box): `4+9=13 (left: 10 13 13)`
* **Level 2 (Branching from Middle):**
* Left branch (Red text): `13-6=7 (left: 7 9)`
* Middle branch (Green text): `13-9=4 (left: 4 6)`
* Right branch: `......`
* **Level 3 (Branching from Middle):**
* Left branch (Red text): `4+6=10 (left: 10)`
* Middle branch (Green text): `4*6=24 (left: 24)`
* Right branch: `......`
### Region 2: Propose Prompt Pipeline (Top Right)
This flow describes how the LM generates "thoughts" or potential moves.
* **Header (a):** `Propose Prompt` (Grey background)
* **Prompt Content Box:**
* `{one example}` (Grey placeholder text)
* `Input: 4 9 10 13`
* `Possible next steps:`
* **Processor:** A rounded square labeled **`LM`**.
* **Output Box:** `Thought Generation` (Grey header)
* `4 + 9 = 13 (left: 10 13 13)` (Highlighted in grey)
* `10 - 4 = 6 (left: 6 9 13)`
* `{...more lines...}` (Grey placeholder text)
### Region 3: Value Prompt Pipeline (Bottom Right)
This flow describes how the LM evaluates the states generated in the tree.
* **Header (b):** `Value Prompt` (Tan/Yellow background)
* **Prompt Content Box:**
* `Evaluate if given numbers can reach 24 (sure/likely/impossible)`
* `10 14: 10 + 14 = 24. sure`
* `{more examples}` (Grey placeholder text)
* `10 13 13` (Highlighted in pink/red)
* **Processor:** A rounded square labeled **`LM`**.
* **Output Box:** `Thought Evaluation` (Tan/Yellow header)
* `(13 - 10) * 13 = 3 * 13 = 39`
* `10 + 13 + 13 = 36 There is no way to obtain 24 with these big numbers. impossible` (The word "impossible" is highlighted in pink).
---
## 2. Flow and Logic Analysis
### Data Flow
1. **Input State:** The process begins with the input numbers `4 9 10 13`.
2. **Proposal:** The **Propose Prompt** (a) feeds the current state into the **LM** to generate multiple potential mathematical operations (**Thought Generation**).
3. **Evaluation:** A specific state from the tree (e.g., `10 13 13`, indicated by the orange arrow) is sent to the **Value Prompt** (b).
4. **Judgment:** The **LM** analyzes the state and provides a qualitative assessment (**Thought Evaluation**). In the example shown, it determines that the state `10 13 13` is `impossible` to resolve to 24.
### Visual Coding
* **Green Text/Paths:** Represent "correct" or "promising" paths in the search tree that eventually lead to the goal (24).
* **Red Text/Paths:** Represent "incorrect" or "dead-end" paths.
* **Arrows:**
* Grey arrows indicate the flow of data into the LM and the generation of outputs.
* The large orange arrow indicates the selection of a specific node (`10 13 13`) for evaluation.
---
## 3. Text Transcription Summary
| Category | Transcribed Text |
| :--- | :--- |
| **Main Input** | Input: 4 9 10 13 |
| **Tree Nodes (Success)** | 10-4=6 (left: 6 9 13); 13-9=4 (left: 4 6); 4*6=24 (left: 24) |
| **Tree Nodes (Failure)** | 4+9=13 (left: 10 13 13); 13-6=7 (left: 7 9); 4+6=10 (left: 10) |
| **Prompt (a)** | (a) Propose Prompt; {one example}; Input: 4 9 10 13; Possible next steps: |
| **Output (a)** | Thought Generation; 4 + 9 = 13 (left: 10 13 13); 10 - 4 = 6 (left: 6 9 13) |
| **Prompt (b)** | (b) Value Prompt; Evaluate if given numbers can reach 24 (sure/likely/impossible); 10 14: 10 + 14 = 24. sure; 10 13 13 |
| **Output (b)** | Thought Evaluation; (13 - 10) * 13 = 3 * 13 = 39; 10 + 13 + 13 = 36 There is no way to obtain 24 with these big numbers. impossible |