In the rapidly evolving world of Artificial Intelligence, Retrieval-Augmented Generation (RAG) has emerged as the standard architecture for grounding Large Language Models (LLMs) in private, custom datasets. Traditional RAG systems excel at searching through plain text, but real-world enterprise data rarely exists as simple prose.
Whether you are working with research papers, financial reports, slide decks, or technical manuals, your documents are filled with mixed modalities: body text interspersed with bar charts, architecture diagrams, scatter plots, flowcharts, and complex tables. Standard text-only RAG pipelines treat these visual elements as noise or rely on basic text extraction techniques that strip away essential visual context.
To truly unlock the knowledge hidden inside visual documents, AI engineers use Multimodal RAG. This guide breaks down the core architecture, challenges, and implementation strategies of Multimodal RAG systems in a beginner-friendly yet technically thorough way.
What Is Multimodal RAG? #
Multimodal Retrieval-Augmented Generation (Multimodal RAG) is an AI system architecture capable of ingesting, indexing, searching, and generating answers from multiple input formats—such as text, images, diagrams, tables, audio, or video—rather than text alone.
While input data can span diverse formats, document-centric Multimodal RAG primarily focuses on combining text and visual elements (images and tables). In most practical applications, the input consists of mixed-modality documents (like PDFs or presentation slides), and the final output is generated as structured, human-readable text.
Key Concepts #
To understand how Multimodal RAG operates, you must first grasp several foundational concepts:
- Multimodality: The ability of an AI system to process and relate different types (modalities) of information—such as text, images, audio, and video.
- Naive (Text-Only) RAG: A traditional pipeline that ingests plain text, converts text chunks into mathematical vectors using a text embedding model, stores them in a vector database, and retrieves matching text chunks to answer user prompts.
- Optical Character Recognition (OCR): Software algorithms (such as Tesseract or RapidOCR) that parse image files to detect and extract raw alphanumeric characters.
- The Representational Problem: The technical hurdle of converting visual data (RGB pixel matrices, resolution, colors, shapes) into numerical representations that reflect abstract meaning.
- The Retrieval Problem: The challenge of performing similarity searches between a user’s text query vector and an image representation when both live in different mathematical spaces.
- Vision Language Models (VLMs): Advanced AI models (such as GPT-4o, Gemini, or Claude 3.5 Sonnet) trained to process both text prompts and visual images simultaneously to generate text responses.
- Truly Multimodal Embeddings (e.g., CLIP): Neural network models designed to map both text strings and raw image files into a single, shared vector space.
- Contrastive Learning: A training technique that teaches models to bring matching image-text pairs close together in vector space while actively pushing non-matching pairs far apart.
- Representational Collapse: A failure mode during neural network training where the model “cheats” by collapsing all output vectors into a single point (such as all zeros) to artificially minimize loss without learning actual features.
Detailed Explanation: Why Traditional RAG Fails for Visual Documents #
To see why Multimodal RAG is necessary, let’s look at how traditional RAG pipelines fail when faced with real-world documents.
The Limits of Standard Document Loading & OCR
When a standard RAG pipeline encounters a PDF or presentation slide containing an image or chart, it typically tries to extract content using Optical Character Recognition (OCR).
OCR models scan images purely for text characters. While this works for scanned text pages, it fails when applied to graphical elements like charts or diagrams:
- Loss of Visual Structure: OCR ignores spatial layout, line curves, bar heights, color coding, and visual connections.
- Loss of Context: Extracting raw text labels yields disconnected numbers and names without meaning.
- LLM Confusion: Feeding unstructured, disconnected numbers into a downstream LLM creates noise, leading to hallucinations or incorrect answers.
Because the extracted OCR text lacks semantic meaning, traditional text embedding models generate low-quality vector representations. When a user asks a question about the chart, the vector database fails to retrieve the correct information.
The Core Technical Bottlenecks #
Building an effective Multimodal RAG pipeline requires solving two main technical challenges:
- The Representational Problem: Text embedding models are trained on linguistic tokens, not binary pixel arrays. You cannot pass a raw PNG or JPEG file into a text embedder and expect a meaningful semantic vector.
- The Retrieval Problem: A text query vector represents linguistic semantic meaning, whereas a raw image array represents pixel intensities. Comparing these two vectors using distance metrics like cosine similarity is impossible because their underlying mathematical dimensions and features do not align.
To solve these bottlenecks, AI developers use two main implementation strategies.
Implementation Strategies: How It Works #
Strategy 1: Text Conversion Using Vision Language Models (VLMs)
The first strategy converts visual data into plain text before vector indexing. This turns a multimodal problem back into a unified, text-based pipeline.
STRATEGY 1 WORKFLOW: VLM-BASED TEXT CONVERSION
Step-by-Step Workflow for Strategy 1: #
- Document Ingestion: Parse the mixed document (PDF or presentation) using a specialized loader (such as
UnstructuredLoaderin high-resolution mode). Separate plain text elements from raw image files and charts. - Visual Captioning via VLM: Send each raw image to a Vision Language Model (such as GPT-4o-mini) guided by a detailed system prompt. The VLM generates a thorough text description detailing chart types, axis labels, specific data points, trends, legends, and structural relationships.
- Text Embedding: Pass both the original text chunks and the new image description texts into a standard text embedding model (such as OpenAI
text-embedding-3). - Vector Storage: Save the resulting dense vectors in a vector database. Crucial Metadata Step: For image description vectors, store the filepath pointer to the original raw image file in the metadata—not just the description text—because the ultimate goal is to retrieve the actual image.
- Retrieval: Convert the user’s incoming text query into a vector, execute a cosine similarity search, and retrieve top matching text chunks along with image file paths.
- Augmentation & Generation: Load the retrieved raw image files (converting them to Base64 format) alongside the retrieved text chunks and original query. Pass all three inputs into a VLM to generate a grounded response.
Strategy 2: Unified Multimodal Embedding Space (e.g., CLIP) #
The second strategy eliminates the need for VLM descriptions during indexing. Instead, it uses a truly multimodal embedding model—most notably CLIP (Contrastive Language-Image Pre-training)—that projects both raw text strings and raw images into the exact same numerical vector space.
Step-by-Step Workflow for Strategy 2: #
- Document Ingestion: Parse the document into separate text chunks and raw image files using a specialized document loader.
- Unified Embedding Generation:
- Pass text chunks into the CLIP Text Encoder (a language transformer).
- Pass raw image files directly into the CLIP Image Encoder (a vision transformer).
- Both encoders produce vectors with identical dimensions (e.g., 512 or 1024 dimensions) and shared semantic features.
- Vector Database Storage: Store text embeddings (with text content in metadata) and image embeddings (with image file paths in metadata) in a single vector database index.
- Direct Multimodal Retrieval: Pass the user’s text query through the CLIP Text Encoder. Perform a direct cosine similarity search against both text and image vectors in the database.
- Augmentation & Generation: Retrieve matching text chunks and image file paths, assemble the augmented prompt, and feed them to a VLM to produce the final answer.
Deep Dive: How CLIP and Contrastive Learning Work #
Understanding how CLIP achieves a shared vector space requires examining its training methodology: Contrastive Learning.
Contrastive Learning — N × N Similarity Matrix #
| Image / Caption | Caption 1 Dog playing | Caption 2 Revenue chart | Caption 3 Mountain | Caption 4 Cat on couch |
|---|---|---|---|---|
| Image 1 Dog | ATTRACTIVE Maximize → 1 | Repulsive Minimize → 0 | Repulsive Minimize → 0 | Repulsive Minimize → 0 |
| Image 2 Revenue Chart | Repulsive Minimize → 0 | ATTRACTIVE Maximize → 1 | Repulsive Minimize → 0 | Repulsive Minimize → 0 |
| Image 3 Mountain | Repulsive Minimize → 0 | Repulsive Minimize → 0 | ATTRACTIVE Maximize → 1 | Repulsive Minimize → 0 |
| Image 4 Cat | Repulsive Minimize → 0 | Repulsive Minimize → 0 | Repulsive Minimize → 0 | ATTRACTIVE Maximize → 1 |
Goal: Maximize diagonal entries (Matching Pairs) Minimize off-diagonal entries (Non-Matching Pairs)
- Pre-Training Dataset: CLIP is pre-trained on a dataset of over 400 million image-caption pairs gathered from the web.
- Two Encoders, One Goal: The model contains an Image Encoder (Vision Transformer) and a Text Encoder (Language Transformer).

Why the Repulsive Force Is Essential: Preventing Representational Collapse
If a model were trained using only an attractive force (trying to bring matching images and captions closer), it would quickly learn to cheat.
Representational Collapse:
If ONLY attractive forces are used ──> Model sets ALL vectors to [0, 0, 0...]
Result: Distance between matching pairs is 0 (Loss minimized!), but the model learned zero useful features.
The model could output the exact same constant vector (such as all zeros) for every image and text input. The distance between matching pairs would equal zero, minimizing loss without the model learning any real visual or linguistic concepts. This failure mode is called Representational Collapse.
Stellar Equilibrium Analogy:
Inward Gravity (Attractive Force) <-STABILITY-> Outward Fusion Pressure (Repulsive Force)
Like a star maintaining equilibrium through a balance between inward gravitational pull and outward nuclear fusion pressure, CLIP maintains a balanced vector space by balancing attractive forces (pulling matching pairs together) and repulsive forces (pushing non-matching pairs apart).
Symmetric Loss (Two-Way Learning) #
CLIP calculates loss in two directions:
- Image-to-Text Loss: For a given image, identify the correct matching text caption.
- Text-to-Image Loss: For a given text caption, identify the correct matching image.
This symmetric training ensures that during inference, a text query vector lands in the exact vector neighborhood of its corresponding visual image.
Step-by-Step Examples
To see how these concepts work in practice, let’s examine three examples drawn from real-world document processing tasks.
Example 1: Bar Chart of City Populations
Consider a PDF containing a bar chart illustrating population metrics across four cities.
| Example 1: Bar Chart Processing | Details |
|---|---|
| Chart | City Population (Millions) |
| Y-Axis | Scale: 0–10 Million |
| Mumbai | 4.0M |
| Delhi | 7.0M |
| Guwahati | 1.3M |
| Surat | 3.0M |
- Standard OCR Output:
"4 7 1.3 3 Mumbai Delhi Guwahati Surat"Failure: Strips spatial information. The downstream LLM cannot determine which number belongs to which city or what the axis scale represents. - Strategy 1 (VLM Description Output):
"A bar chart titled 'City Population'. The y-axis shows population in millions ranging from 0 to 10. The x-axis lists four cities: Delhi (highest bar at 7.0 million), Mumbai (second highest at 4.0 million), Surat (3.0 million), and Guwahati (lowest bar at 1.3 million)."Result: High-quality, semantic text chunk suitable for standard text embedding models. - Strategy 2 (CLIP Embedding Output): The raw chart image is passed into the CLIP Image Encoder, generating a 512-dimensional vector. When a user asks “Which city has a population under 2 million?”, the query string is converted via the CLIP Text Encoder into a vector that directly matches the image vector for Guwahati’s low bar chart.
Example 2: Technical Line Chart (Self-RAG vs. Self-C-RAG)
Consider an AI research paper comparing two retrieval architectures on a line graph.
| Example 2: Line Graph Analysis | Details |
|---|---|
| Y-Axis | Generation Accuracy (%) |
| X-Axis | Retrieval Accuracy (%) |
| Self-C-RAG | Top line, gentle slope |
| Self-RAG | Bottom line, steep drop below 50% retrieval |
| Baseline | No-Retrieval Baseline, dotted line at ~28% |
When indexed via a Multimodal RAG pipeline, a query such as:
“How does generation accuracy change as retrieval accuracy drops for Self-C-RAG versus Self-RAG?”
Retrieves both the relevant text section and the line chart image path. The downstream VLM reads the visual plot and generates a precise answer:
Answer: Both systems lose generation accuracy as retrieval quality drops. However, Self-RAG experiences a steep drop performance loss, whereas Self-C-RAG degrades more gracefully, maintaining higher absolute accuracy across all points and staying well above the 28% no-retrieval baseline.
Example 3: Technical Performance Data Table
Tables present a unique challenge in multimodal documents. They contain structured alphanumeric data that standard OCR often misaligns or corrupts.
EXAMPLE 3: EXPLICIT DATA TABLE
| System | TFLOPs / Token | Execution Time (s) |
|---|---|---|
| Standard RAG | 27.2 | 0.512 |
| Self-RAG | 26.5 – 132.4 | 0.741 |
| Self-C-RAG | 31.0 – 145.0 | 0.580 |
By parsing tables as visual image elements or structured HTML representations rather than flattened text strings, Multimodal RAG preserves row-column alignments.
When queried for “What is the upper bound TFLOP requirement for Self-RAG?”, the system retrieves the table image, allowing the VLM to read the precise cell value: 132.4 TFLOPs.
Comparison of Implementation Strategies
| Feature / Metric | Strategy 1: VLM Text Description | Strategy 2: Unified CLIP Vector Space |
|---|---|---|
| Primary Mechanism | Converts images to detailed text captions via VLM before embedding. | Projects raw text and raw images directly into a shared vector space. |
| Ingestion Complexity | Low to Moderate: Uses standard text embedding models and standard vector DBs. | Moderate: Requires specialized multimodal embedders (like OpenCLIP). |
| Ingestion Cost | High: Calling VLMs to caption hundreds of document images is expensive. | Very Low: Runs local/lightweight vision encoders without VLM API calls during indexing. |
| Indexing Speed | Slower: Bottlenecked by sequential VLM API captioning calls. | Fast: Highly parallelizable local neural network encoding. |
| Risk of Hallucination | Higher: VLM may hallucinate numbers or miss fine chart details during initial captioning. | Zero at Indexing: No text generation happens during ingestion; raw visual data is encoded directly. |
| Retrieval Accuracy | Depends heavily on the quality and completeness of the VLM system prompt. | Highly accurate for semantic and visual matching; requires clear text queries. |
| VLM Dependency | Required at both Ingestion and Generation phases. | Required only at the final Generation phase. |
Advantages and Limitations #
Strategy 1 (VLM Text Description)
- Advantages:
- Simple to integrate into existing text-only RAG infrastructure.
- Leverages highly capable proprietary VLMs (like GPT-4o) to explain complex graphics.
- Generated text descriptions can be inspected and edited by humans for quality control.
- Limitations:
- High API costs for documents containing many images.
- Risk of information loss if the VLM caption misses small details (like decimal points or key labels).
- Strong dependency on carefully written system prompts.
Strategy 2 (Unified Multimodal Space via CLIP)
- Advantages:
- Fast and cost-effective ingestion—no VLM API calls needed during indexing.
- No risk of text hallucination during document indexing.
- Preserves raw visual feature representations directly in the vector database.
- Limitations:
- Requires embedding models that support multimodal spaces (e.g., OpenCLIP, Fashion-CLIP).
- Text query embeddings must align well with visual feature spaces.
- Local model deployment may require GPU hardware for optimal speed.
Handling Complex Document Tables #
Tables occupy a middle ground between plain text and visual images. How should you process them in a Multimodal RAG system?
- Treating Tables as Plain Text: Standard text loaders often strip away borders and line breaks, running cell values together into an unstructured string. A number in column 4 might end up right next to a label from column 1, rendering the data useless.
- Treating Tables as Visual Images: High-resolution parsers (like
UnstructuredLoader) can crop tables as standalone image elements. Treating table grids as visual images preserves structural layout, column bounds, and formatting. When passed to a VLM during answer generation, the model reads the visual table cleanly without misalignment errors.
Real-World Applications #
- Academic and Research Paper Analysis: Instantly search across thousands of scientific papers, extracting precise data points from scatter plots, ablation tables, and neural network diagrams.
- Financial & Enterprise Reporting: Analyze quarterly earnings decks, balance sheets, and annual reports containing complex bar charts, revenue graphs, and financial tables.
- Engineering & Architecture Manuals: Query technical blueprints, circuit diagrams, and maintenance guides where spatial relationships between components are critical.
- Medical Diagnostics & Literature: Ingest clinical papers containing patient case studies, medical imaging scans (X-rays, MRIs), and dosage charts.
Key Points for Revision #
- Multimodal RAG expands traditional RAG by ingesting, indexing, and searching across both textual and visual elements (images, charts, tables).
- OCR is insufficient for visual diagrams because it strips out visual hierarchy, bar heights, scale context, and spatial layout.
- The two primary hurdles in Multimodal RAG are the Representational Problem (how to convert visual pixels into meaningful vectors) and the Retrieval Problem (how to search across different feature spaces).
- Strategy 1 uses a Vision Language Model (VLM) to describe images as detailed text strings, which are then indexed using standard text embedding models.
- Strategy 2 uses a Unified Multimodal Model (like CLIP) to project both raw text and raw images directly into a single, shared vector space.
- CLIP is trained on hundreds of millions of image-caption pairs using Contrastive Learning, maximizing diagonal similarity (attractive force) while minimizing off-diagonal similarity (repulsive force).
- The repulsive force in contrastive learning prevents Representational Collapse, where a model collapses all output vectors into a constant point to cheat the loss function.
- For vector storage, text embeddings store original text in metadata, while image embeddings store image file paths/pointers to enable raw image retrieval.
- Complex document tables are often best handled as visual images to preserve row-column alignment and prevent formatting errors.
Interview and Exam Questions #
Question 1: Why does standard OCR fail when processing visual charts and diagrams in a RAG pipeline?
Answer: Standard OCR extracts raw text characters while ignoring visual context, spatial relationships, bar heights, line trends, legend color-coding, and axis scales. This results in disconnected strings of numbers and labels that lack semantic meaning, confusing downstream LLMs and leading to poor vector retrieval performance.
Question 2: Explain the difference between Strategy 1 (VLM Description) and Strategy 2 (Unified CLIP Embedding) in Multimodal RAG.
Answer: Strategy 1 converts visual images into detailed text captions using a VLM before indexing, allowing traditional text embedding models and vector databases to be used. Strategy 2 uses a truly multimodal model (like CLIP) containing separate text and vision encoders that map raw text and raw images directly into a single shared vector space, eliminating the need for VLM captioning during indexing.
Question 3: What is Representational Collapse in contrastive learning, and how is it prevented?
Answer: Representational Collapse occurs during neural network training when a model “cheats” the loss function by outputting the exact same constant vector (e.g., all zeros) for every input, driving distance between pairs to zero without learning real features. It is prevented by combining an attractive force (maximizing similarity between matching image-text pairs) with a repulsive force (minimizing similarity between non-matching pairs).
Question 4: Why should you store image file path pointers in vector database metadata instead of raw binary image data?
Answer: Vector databases are optimized for indexing high-dimensional floating-point vectors, not large binary image blobs (PNG/JPEG). Storing lightweight file path pointers in metadata keeps the vector database fast and lean, while enabling the system to load and pass the raw image to a Vision Language Model during the final generation phase.
Question 5: How does CLIP ensure that text query vectors and image vectors can be compared using cosine similarity?
Answer: CLIP uses a dual-encoder architecture (Text Transformer and Vision Transformer) trained symmetrically on millions of image-caption pairs using contrastive loss. This joint training aligns the output dimensions and feature spaces of both encoders, ensuring that a text query describing a visual concept lands in the same vector neighborhood as an image depicting that same concept.
Quick Revision Summary #
Multimodal RAG bridges the gap between text-based language models and the visually rich documents used in real-world workflows. By moving beyond plain OCR and adopting either VLM-based text conversion or unified multimodal vector spaces (CLIP), AI systems can accurately index, search, and answer questions from complex charts, diagrams, slide decks, and tables. Mastering these concepts—from contrastive learning dynamics to metadata pointer management—is key to building robust, production-ready AI applications for visual document processing.
Multimodal RAG Quiz #
1. What is the primary output format generated in most document-focused Multimodal RAG systems?
Raw binary image files
Audio streams
Text responses
Executable Python scripts
Explanation
In most document-centric Multimodal RAG pipelines, while inputs consist of mixed modalities such as text and images, the final generated output is text
.
2. Why does standard Optical Character Recognition (OCR) often fail when extracting visual data from charts in RAG pipelines?
OCR cannot run on PDF document pages
OCR strips away visual structure, spatial context, and layout relationships
OCR automatically translates all text into foreign languages
OCR increases vector database storage size by 10x
Explanation
OCR extracts raw text and numbers but loses the spatial structure, layout formatting, and visual context needed to make sense of the data
.
3. In Multimodal RAG, what is the 'Representational Problem'?
The inability to store PDF files in local directories
The challenge of converting visual data (pixels) into vector representations since traditional embedders only accept text
The slow generation speed of standard text-only Large Language Models
The failure of vector databases to perform metadata filtering
Explanation
The representational problem refers to the difficulty of creating vector embeddings for images, as standard embedding models are trained strictly on text data
.
4. How does Strategy 1 resolve the representational and retrieval challenges in Multimodal RAG?
By converting all user queries into JPEG images
By using a Vision Language Model (VLM) to generate detailed text descriptions of images before embedding
By deleting all images from the PDF document before chunking
By storing raw binary image data directly inside the text index
Explanation
Strategy 1 uses a VLM to generate detailed text descriptions of images, converting the image modality into text so standard text embedders can be used
.
5. In Strategy 1, what critical piece of metadata must be stored alongside image caption embeddings in the vector database?
The VLM's model temperature setting
The raw Base64 binary string of the image
The file path pointer to the original image
The user's search query history
Explanation
Vector database entries for image captions store the file path or pointer to the original image in their metadata so the raw image can be retrieved during generation
.
6. What is a major bottleneck associated with Strategy 1 (VLM Text Descriptions)?
It cannot be implemented using Python libraries
High dependence on VLMs and system prompts, leading to potential hallucinations or missed details
It requires custom vector database software that cannot run locally
It completely eliminates the need for prompt engineering
Explanation
Strategy 1 heavily depends on VLM accuracy and system prompt quality; inaccuracies or missed details in captions propagate errors downstream
.
7. How does Strategy 2 differ from Strategy 1 in terms of image embedding?
It uses a unified multimodal embedding model (like CLIP) to embed text and raw images directly into the same vector space
It converts user text queries into audio files
It uses OCR to extract text and deletes the visual images
It requires two separate vector databases running on different servers
Explanation
Strategy 2 uses a truly multimodal embedding model like CLIP that directly maps both text and raw images into a shared vector space
.
8. What does the acronym CLIP stand for?
Cross-Language Image Processing
Contrastive Language-Image Pre-training
Convolutional Layer Indexing Protocol
Categorical Language Interface Program
Explanation
CLIP stands for Contrastive Language-Image Pre-training, an architecture trained on paired text and image data
.
9. In contrastive learning for models like CLIP, what is the role of the 'attractive' aspect?
To maximize similarity between matching image and caption pairs
To push unrelated images and captions as far apart as possible
To compress vector dimensions down to zero
To automatically delete corrupt image files
Explanation
The attractive aspect in contrastive learning pulls matching image-caption pair vectors closer together, maximizing their similarity score
.
10. What phenomenon occurs if a model is trained using ONLY attractive forces without repulsive forces?
Representational Collapse
Gradient Explosion
Over-retrieval
Dynamic Chunking Failure
Explanation
Without repulsive forces, the model cheats by mapping all inputs to a single constant vector, a failure mode known as representational collapse
.
11. What training technique in CLIP calculates loss from both Image-to-Text and Text-to-Image perspectives?
Symmetric Contrastive Loss
Unilateral Cross-Entropy
Binary Margin Loss
Asymmetric Quantization
Explanation
CLIP uses symmetric contrastive loss to compute cross-entropy loss in both directions: Image-to-Text for ingestion and Text-to-Image for retrieval
.
12. Why is storing raw binary image data directly in vector database index vectors discouraged?
Vector stores are designed for floating-point feature vectors, not heavy binary data
Binary images corrupt Python script execution
Base64 encoding is illegal in enterprise applications
VLMs cannot read Base64 encoded strings
Explanation
Vector stores are built to index dense floating-point vectors for similarity search; keeping image file paths in metadata prevents bloated database size
.
13. Why is it often recommended to treat complex document tables as images in Multimodal RAG?
It eliminates the need for a Vision Language Model
It preserves structural grid formatting and prevents OCR text alignment errors
It reduces vector database storage by 90%
Text embedding models cannot process numbers
Explanation
Treating tables as visual images preserves row-column alignment and grid layout, preventing OCR misalignments
.
14. What function does the OpenCLIP / ChromaDB pipeline provide for adding images to a vector database?
store.add_images()
store.insert_pictures()
store.append_binary()
store.upload_raw()
Explanation
In ChromaDB with OpenCLIP integrations, add_images() is used to pass image file paths to the multimodal embedder and store them in the vector database
.
15. In advanced RAG architectures, what does Self-RAG stand for?
Self-Regulated Retrieval-Augmented Generation
Self-Reflective Retrieval-Augmented Generation
Sequential-RAG with Agentic Formatting
Semantic-RAG for Analytical Knowledge
Explanation
Self-RAG stands for Self-Reflective Retrieval-Augmented Generation, an architecture where the model critiques its retrieval relevance and generation quality
.