<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Types of RAG on AI Vault</title><link>https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/</link><description>Recent content in Types of RAG on AI Vault</description><generator>Hugo</generator><language>en</language><atom:link href="https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/index.xml" rel="self" type="application/rss+xml"/><item><title>Graph RAG</title><link>https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/graph-rag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/graph-rag/</guid><description>&lt;p&gt;&lt;em&gt;Retrieve the connections, not just the passages.&lt;/em&gt;&lt;/p&gt;&#10;&lt;h2 id="what-it-is"&gt;What it is&lt;/h2&gt;&#10;&lt;p&gt;Standard RAG stores documents as isolated chunks. Each chunk is retrieved on its own&#10;similarity to the question, and nothing in the index records that chunk 12 and chunk 87 are&#10;about the same company. Graph RAG indexes &lt;strong&gt;entities and the relationships between them&lt;/strong&gt;,&#10;then retrieves a connected subgraph instead of a ranked list.&lt;/p&gt;&#10;&lt;pre class="mermaid"&gt;flowchart TD&#10; Q[Question] --&amp;gt; S[Standard RAG index]&#10; Q --&amp;gt; G[Graph RAG index]&#10; S --&amp;gt; SC[Chunk 12 - Chunk 87 - Chunk 3]&#10; SC --&amp;gt; SO[Top-k passages, unconnected]&#10; G --&amp;gt; N1[Acme Corp]&#10; N1 --&amp;gt;|supplies| N2[Beta Ltd]&#10; N2 --&amp;gt;|owned by| N3[Delta Group]&#10; N3 --&amp;gt;|in litigation with| N1&#10; N1 --&amp;gt; GO[A connected subgraph]&lt;/pre&gt;&#10;&lt;h2 id="how-it-works"&gt;How it works&lt;/h2&gt;&#10;&lt;p&gt;Three things happen at ingest time, not at query time:&lt;/p&gt;</description></item><item><title>Multimodal RAG</title><link>https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/multimodal-rag/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/multimodal-rag/</guid><description>&lt;p&gt;&lt;em&gt;When the answer is in a diagram, not a paragraph.&lt;/em&gt;&lt;/p&gt;&#10;&lt;h2 id="what-it-is"&gt;What it is&lt;/h2&gt;&#10;&lt;p&gt;Retrieval where the source material is not prose: wiring diagrams, scanned invoices, chart&#10;images, slide decks, call recordings. A text-only index can find the page that &lt;em&gt;mentions&lt;/em&gt; the&#10;thing, but not the thing itself.&lt;/p&gt;&#10;&lt;p&gt;This is about &lt;strong&gt;retrieval&lt;/strong&gt;. For the model&amp;rsquo;s ability to read images and audio as input, see&#10;&lt;a href="https://namphuongtran.github.io/ai-vault/foundations/understand/multimodality/"&gt;Multimodality&lt;/a&gt;.&lt;/p&gt;&#10;&lt;h2 id="two-designs"&gt;Two designs&lt;/h2&gt;&#10;&lt;pre class="mermaid"&gt;flowchart TD&#10; subgraph D1[Design 1 - one shared embedding space]&#10; A1[Images and text] --&amp;gt; ME[Multimodal embedding model]&#10; Q1[Text question] --&amp;gt; ME&#10; ME --&amp;gt; V1[(One vector store)]&#10; end&#10; subgraph D2[Design 2 - describe, then index the text]&#10; A2[Images, tables, audio] --&amp;gt; CAP[Model writes a text description]&#10; CAP --&amp;gt; TE[Text embedding model]&#10; TE --&amp;gt; V2[(Text vector store)]&#10; V2 --&amp;gt; ORIG[Pointer back to the original file]&#10; end&lt;/pre&gt;&#10;&lt;h2 id="how-it-works"&gt;How it works&lt;/h2&gt;&#10;&lt;p&gt;&lt;strong&gt;Design 1&lt;/strong&gt; embeds pictures and words into the same vector space, so a text question&#10;retrieves an image directly. This is the CLIP idea. It is elegant, and it needs a multimodal&#10;embedding model that handles your domain well.&lt;/p&gt;</description></item><item><title>Self-Correcting RAG</title><link>https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/self-correcting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://namphuongtran.github.io/ai-vault/deep-dives/types-of-rag/self-correcting/</guid><description>&lt;p&gt;&lt;em&gt;Check the retrieval before you trust it.&lt;/em&gt;&lt;/p&gt;&#10;&lt;h2 id="what-it-is"&gt;What it is&lt;/h2&gt;&#10;&lt;p&gt;Standard RAG retrieves once and answers, whatever came back. A self-correcting design adds a&#10;&lt;strong&gt;grading step&lt;/strong&gt; and a way to retry. Two named designs do this, and they grade different&#10;things:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;CRAG&lt;/strong&gt; grades the retrieved chunks, &lt;strong&gt;before&lt;/strong&gt; generating.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Self-RAG&lt;/strong&gt; grades its own draft answer, &lt;strong&gt;after&lt;/strong&gt; generating, and can skip retrieval&#10;entirely when the question does not need it.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;pre class="mermaid"&gt;flowchart TD&#10; Q[Question] --&amp;gt; R[Retrieve]&#10; R --&amp;gt; G{CRAG grades the retrieved chunks}&#10; G --&amp;gt;|correct| GEN[Generate]&#10; G --&amp;gt;|ambiguous| REF[Keep the good parts and add a web search]&#10; G --&amp;gt;|incorrect| NEW[Discard and search elsewhere]&#10; REF --&amp;gt; GEN&#10; NEW --&amp;gt; GEN&#10; GEN --&amp;gt; S{Self-RAG asks is each claim supported}&#10; S --&amp;gt;|no| R&#10; S --&amp;gt;|yes| OUT[Answer with citations]&lt;/pre&gt;&#10;&lt;p&gt;That diagram simplifies both papers in one way each. In CRAG the refine pass also runs on the&#10;&lt;em&gt;correct&lt;/em&gt; branch, not only on ambiguous. And the Self-RAG retry edge is how agent frameworks&#10;commonly implement it; in the paper the model generates from several retrieved passages in&#10;parallel, and the reflection tokens pick the best-supported one.&lt;/p&gt;</description></item></channel></rss>