# Technical Document Extraction: Iterative Retrieval-Augmented Generation (IterDRAG) Workflow
This document provides a comprehensive technical extraction of the provided architectural diagram, which illustrates the workflows for standard Retrieval-Augmented Generation (RAG) and an iterative variant labeled "IterDRAG."
## 1. Component Isolation
The diagram is organized into three primary functional regions, delineated by dashed grey boundary lines:
* **Input/Standard RAG Region (Left):** Contains the primary data inputs and the direct path to a final answer.
* **DRAG Region (Bottom-Center):** Represents a single-step decomposition phase.
* **IterDRAG Region (Right):** Represents an iterative, multi-step decomposition and retrieval process.
---
## 2. Data Components and Labels
### Input Blocks (Left Column)
* **In-Context Examples:** Grey rectangle.
* **Documents:** Red rectangle.
* **Input Query:** Blue rectangle.
### Process Nodes (Main Flow)
* **Sub-Query 1:** Pink rectangle.
* **Intermediate Answer 1:** Pink rectangle.
* **Sub-Query 2:** Red rectangle.
* **Intermediate Answer 2:** Red rectangle.
* **Sub-Query n:** Purple rectangle.
* **Intermediate Answer n:** Purple rectangle.
* **Final Answer:** Green rectangle (appears twice: once for the direct path and once for the iterative path).
### Action Icons and Text
* **Robot Icon + "Generate":** Indicates a Large Language Model (LLM) generation step.
* **Magnifying Glass/Globe Icon + Robot Icon + "Retrieve & Generate":** Indicates a retrieval step followed by an LLM generation step.
* **Ellipsis (...):** Located between Intermediate Answer 2 and Sub-Query n, indicating an undefined number of iterative steps.
---
## 3. Workflow and Logic Flow
### Path A: Standard Direct Generation
1. The **Input Query** (Blue) flows downward.
2. An LLM performs a **Generate** action.
3. Produces a **Final Answer** (Green, bottom left).
### Path B: IterDRAG (Iterative Decomposition)
This path follows a sequential, dependency-based logic:
1. **Initialization:** The **Input Query** (Blue) is sent to the first decomposition stage.
2. **Step 1 (Pink):**
* The system performs a **Generate** action to create **Sub-Query 1**.
* A **Retrieve & Generate** action is performed on Sub-Query 1 to produce **Intermediate Answer 1**.
3. **Step 2 (Red):**
* **Intermediate Answer 1** feeds into the next stage to generate **Sub-Query 2**.
* A **Retrieve & Generate** action is performed on Sub-Query 2 to produce **Intermediate Answer 2**.
4. **Step n (Purple):**
* After an arbitrary number of iterations (...), the process reaches **Sub-Query n**.
* A **Retrieve & Generate** action produces **Intermediate Answer n**.
5. **Synthesis:**
* A green horizontal line aggregates the **Input Query** and all **Intermediate Answers (1, 2, ... n)**.
* A final **Generate** action is performed on this aggregated context.
* Produces the **Final Answer** (Green, bottom right).
---
## 4. Spatial Grounding and Visual Encoding
| Element | Color | Spatial Placement | Logic/Trend |
| :--- | :--- | :--- | :--- |
| **Input Query** | Blue | Left-center | The primary trigger for all subsequent processes. |
| **Sub-Queries** | Pink/Red/Purple | Top row, right of input | These move horizontally, representing the progression of the decomposition. |
| **Intermediate Answers** | Pink/Red/Purple | Middle row | These are positioned directly below their respective sub-queries, showing a 1:1 relationship. |
| **Final Answer** | Green | Bottom-left & Bottom-right | Represents the terminal state of the workflow. |
| **Aggregation Line** | Green | Bottom horizontal | Connects the original query and all intermediate results to the final generation step. |
---
## 5. Summary of System Logic
The diagram contrasts a simple "Query-to-Answer" model with an iterative "Decompose-Retrieve-Answer" model. The **IterDRAG** process is characterized by its sequential nature, where each subsequent sub-query is informed by the intermediate answer of the previous step. The final output is synthesized from the original query combined with the cumulative knowledge gathered across all $n$ iterations.