# Technical Analysis: Retrieval-Augmented Generation (RAG) Architectures
This document provides a detailed technical extraction of an infographic comparing three advanced RAG (Retrieval-Augmented Generation) workflows: **Iterative**, **Recursive**, and **Adaptive**.
The image is segmented into three distinct vertical panels, each representing a specific logic flow for processing a user query into a final response.
---
## 1. Iterative Workflow
**Objective:** Provide more context information.
### Components and Flow
* **Header:** "ITERATIVE" (Blue text) with the subtitle "Provide more context information."
* **Process Flow:**
1. **Query (Green Box):** The entry point of the system.
2. **Retrieve (Grey Box):** Fetches relevant documents based on the query.
3. **Generate (Grey Box):** Produces an initial output based on retrieved data.
4. **Judge (Orange Diamond):** A decision node evaluating the quality or completeness of the generation.
5. **Feedback Loop:** A dashed blue line labeled **"Iterate N Times"** connects the "Judge" back to the "Retrieve" step.
6. **Exit Condition:** A solid blue line labeled **"Max Times / Threshold"** leads from the "Judge" to the final output.
7. **Response (Green Box):** The final output delivered to the user.
---
## 2. Recursive Workflow
**Objective:** Break down complex problems step by step.
### Components and Flow
* **Header:** "RECURSIVE" (Purple text) with the subtitle "Break down complex problems step by step."
* **Process Flow:**
1. **Query (Green Box):** The entry point.
2. **Retrieve (Grey Box):** Initial data retrieval.
3. **Generate (Grey Box):** Initial generation.
4. **Judge (Orange Diamond):** Evaluates if the problem requires further decomposition.
5. **Feedback Loop:** A dashed blue line leads from "Judge" to a specialized component: **"Query Transformation / Decomposition"** (Grey Box). This component then feeds back into the "Retrieve" step.
6. **Exit Condition:** A solid blue line labeled **"Max Depth (Tree) / Threshold"** leads from the "Judge" to the final output.
7. **Response (Green Box):** The final output.
---
## 3. Adaptive Workflow
**Objective:** Flexible and active control of retrieval and generation.
### Components and Flow
* **Header:** "ADAPTIVE" (Dark Blue/Gold theme) with the subtitle "Flexible and active control of retrieval and generation."
* **Process Flow:**
1. **Query (Green Box):** The entry point.
2. **Judge (Orange Diamond - Initial):** Acts as a router. It is labeled with a side-note: **"Retrieve On Demand."**
* **Path A:** If retrieval is not needed, it bypasses directly to a standalone **Generate** (Grey Box) on the left, which then leads to the **Response**.
* **Path B:** If retrieval is needed, it proceeds down the main center stack.
3. **Retrieve (Grey Box):** Standard retrieval step.
4. **Generate (Grey Box):** Standard generation step.
5. **Judge (Orange Diamond - Secondary):** Evaluates the generated content.
6. **Feedback Loop:** A dashed blue line leads from the secondary "Judge" to **"Query Transformation / Decomposition"** (Grey Box), which loops back to the "Retrieve" step.
7. **Exit Condition:** A solid blue line labeled **"Generate Special Token / Threshold"** leads from the secondary "Judge" to the final output.
8. **Response (Green Box):** The final output.
---
## Summary Table of Logic Gates
| Workflow | Primary Loop Mechanism | Termination Criteria |
| :--- | :--- | :--- |
| **Iterative** | Simple loop back to Retrieval | Fixed number of iterations (N) or quality threshold. |
| **Recursive** | Query Transformation / Decomposition | Maximum tree depth or quality threshold. |
| **Adaptive** | Routing (Retrieve on Demand) + Decomposition | Special token generation or quality threshold. |
## Visual Legend & Symbology
* **Green Rounded Rectangles:** Input (Query) and Output (Response).
* **Grey Rounded Rectangles:** Functional processing steps (Retrieve, Generate, Transform).
* **Orange Diamonds:** Decision/Evaluation nodes (Judge).
* **Solid Blue Arrows:** Primary linear progression.
* **Dashed Blue Arrows:** Iterative or conditional feedback loops.