# Technical Document: Flowchart Analysis
## Diagram Overview
The image contains three distinct flowcharts representing different algorithmic approaches: **Iterative**, **Recursive**, and **Adaptive**. Each flowchart outlines a process flow with decision points, feedback loops, and termination conditions.
---
### 1. Iterative Approach
**Title**: ITERATIVE
**Subtitle**: Provide more context information
#### Key Components:
- **Start**: `Query` (green box)
- **Process**:
- `Retrieve` (gray box)
- `Generate` (gray box)
- **Decision Point**: `Judge` (orange diamond)
- **Termination Condition**:
- `Max Times / Threshold` (dashed arrow feedback loop)
- **End**: `Response` (green box)
#### Flow Logic:
```
Query → Retrieve → Generate → Judge → (Terminate if condition met) → Response
```
---
### 2. Recursive Approach
**Title**: RECURSIVE
**Subtitle**: Break down complex problems step by step
#### Key Components:
- **Start**: `Query` (green box)
- **Process**:
- `Retrieve` (gray box)
- `Generate` (gray box)
- **Decision Point**: `Judge` (orange diamond)
- **Recursive Step**:
- `Query Transformation / Decomposition` (dashed arrow feedback loop)
- **Termination Condition**:
- `Max Depth (Tree) / Threshold` (dashed arrow feedback loop)
- **End**: `Response` (green box)
#### Flow Logic:
```
Query → Retrieve → Generate → Judge → (Transform/Decompose Query) → Response
```
---
### 3. Adaptive Approach
**Title**: ADAPTIVE
**Subtitle**: Flexible and active control of retrieval and generation
#### Key Components:
- **Start**: `Query` (green box)
- **Process**:
- `Retrieve On Demand` (dashed arrow feedback loop)
- `Generate` (gray box)
- **Decision Point**: `Judge` (orange diamond)
- **Special Termination Condition**:
- `Generate Special Token / Threshold` (dashed arrow feedback loop)
- **End**: `Response` (green box)
#### Flow Logic:
```
Query → Retrieve On Demand → Generate → Judge → (Generate Special Token if condition met) → Response
```
---
### Common Elements Across All Diagrams:
1. **Color Coding**:
- **Green Boxes**: Input/Output steps (`Query`, `Response`)
- **Gray Boxes**: Core processing steps (`Retrieve`, `Generate`)
- **Orange Diamonds**: Decision points (`Judge`)
2. **Feedback Loops**:
- Dashed arrows indicate iterative/recursive/conditional repetition.
3. **Termination Conditions**:
- Explicit thresholds or maximum iterations/depths govern process exit.
---
### Summary Table
| Approach | Key Feature | Termination Condition |
|-------------|--------------------------------------|-------------------------------------|
| Iterative | Fixed iteration count | `Max Times / Threshold` |
| Recursive | Query decomposition | `Max Depth (Tree) / Threshold` |
| Adaptive | On-demand retrieval | `Generate Special Token / Threshold`|
---
### Notes:
- All diagrams emphasize **contextual control** through feedback loops.
- The **Adaptive** approach introduces dynamic token generation for specialized termination.
- **Recursive** and **Iterative** share structural similarities but differ in decomposition vs. repetition logic.