<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Rag on Enterprise AI &amp; Agentic AI Knowledge Hub</title>
		<link>https://samirsahoo.github.io/enterprise-ai/tags/rag/</link>
		<description>Recent content in Rag on Enterprise AI &amp; Agentic AI Knowledge Hub</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
			<copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright>
		
		
			<atom:link href="https://samirsahoo.github.io/enterprise-ai/tags/rag/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>RAG Fundamentals: Retrieval-Augmented Generation</title>
				<link>https://samirsahoo.github.io/enterprise-ai/rag/rag-fundamentals/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/rag/rag-fundamentals/</guid>
				<description>&lt;h2 id=&#34;simple-definition&#34;&gt;Simple definition&lt;a class=&#34;heading-anchor&#34; href=&#34;#simple-definition&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Retrieval-augmented generation (RAG)&lt;/strong&gt; answers a question in two steps: first &lt;strong&gt;retrieve&lt;/strong&gt; the most relevant pieces of your own documents, then ask the LLM to &lt;strong&gt;generate&lt;/strong&gt; an answer using those pieces as context.&lt;/p&gt;&#xA;&lt;p&gt;Analogy: an open-book exam. The model is a smart student who has not read your company handbook. RAG hands them the right pages before they answer.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Chunking and Embeddings</title>
				<link>https://samirsahoo.github.io/enterprise-ai/rag/chunking-and-embeddings/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/rag/chunking-and-embeddings/</guid>
				<description>&lt;h2 id=&#34;simple-definition&#34;&gt;Simple definition&lt;a class=&#34;heading-anchor&#34; href=&#34;#simple-definition&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Chunking&lt;/strong&gt; is splitting documents into smaller passages so that search can return just the relevant part, and so it fits in the prompt.&lt;/li&gt;&#xA;&lt;li&gt;An &lt;strong&gt;embedding&lt;/strong&gt; is a list of numbers (a vector) that represents the &lt;em&gt;meaning&lt;/em&gt; of a piece of text. Texts with similar meaning have vectors that are close together.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Together they decide what your RAG system can find.&lt;/p&gt;</description>
			</item>
			<item>
				<title>RAG with Spring AI</title>
				<link>https://samirsahoo.github.io/enterprise-ai/spring-ai-governance/spring-ai-rag/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/spring-ai-governance/spring-ai-rag/</guid>
				<description>&lt;h2 id=&#34;what-we-are-building&#34;&gt;What we are building&lt;a class=&#34;heading-anchor&#34; href=&#34;#what-we-are-building&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A Spring Boot service that ingests policy documents into PostgreSQL with &lt;strong&gt;pgvector&lt;/strong&gt;, then answers questions with citations, filtered by the user&amp;rsquo;s department.&lt;/p&gt;&#xA;&lt;figure class=&#34;diagram&#34; aria-label=&#34;Spring AI RAG components&#34;&gt;&lt;figcaption class=&#34;diagram__title&#34;&gt;Spring AI RAG components&lt;/figcaption&gt;&#xA;  &lt;pre class=&#34;mermaid&#34;&gt;flowchart LR&#xA;    subgraph Ingest[&amp;#34;Ingestion — ETL pipeline&amp;#34;]&#xA;        DR[&amp;#34;DocumentReader&amp;lt;br/&amp;gt;PagePdfDocumentReader, TikaDocumentReader,&amp;lt;br/&amp;gt;MarkdownDocumentReader, JsonReader&amp;#34;] --&amp;gt; TS[&amp;#34;DocumentTransformer&amp;lt;br/&amp;gt;TokenTextSplitter,&amp;lt;br/&amp;gt;KeywordMetadataEnricher,&amp;lt;br/&amp;gt;SummaryMetadataEnricher&amp;#34;]&#xA;        TS --&amp;gt; VW[&amp;#34;DocumentWriter&amp;lt;br/&amp;gt;VectorStore.add()&amp;#34;]&#xA;    end&#xA;    VW --&amp;gt; PG[(&amp;#34;PostgreSQL + pgvector&amp;lt;br/&amp;gt;vector_store table&amp;#34;)]&#xA;    subgraph Query[&amp;#34;Query&amp;#34;]&#xA;        CC[&amp;#34;ChatClient&amp;#34;] --&amp;gt; RAA[&amp;#34;RetrievalAugmentationAdvisor&amp;lt;br/&amp;gt;query transformers → retriever → augmenter&amp;#34;]&#xA;        RAA --&amp;gt; PG&#xA;        RAA --&amp;gt; LLM((&amp;#34;ChatModel&amp;#34;))&#xA;    end&lt;/pre&gt;&#xA;&lt;/figure&gt;&#xA;&lt;h2 id=&#34;dependencies-and-configuration&#34;&gt;Dependencies and configuration&lt;a class=&#34;heading-anchor&#34; href=&#34;#dependencies-and-configuration&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-xml&#34; data-lang=&#34;xml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.ai&lt;span class=&#34;nt&#34;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-ai-starter-vector-store-pgvector&lt;span class=&#34;nt&#34;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.ai&lt;span class=&#34;nt&#34;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-ai-vector-store-advisor&lt;span class=&#34;nt&#34;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;    &lt;span class=&#34;c&#34;&gt;&amp;lt;!-- QuestionAnswerAdvisor --&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.ai&lt;span class=&#34;nt&#34;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-ai-rag&lt;span class=&#34;nt&#34;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;                     &lt;span class=&#34;c&#34;&gt;&amp;lt;!-- RetrievalAugmentationAdvisor --&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;groupId&amp;gt;&lt;/span&gt;org.springframework.ai&lt;span class=&#34;nt&#34;&gt;&amp;lt;/groupId&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;  &lt;span class=&#34;nt&#34;&gt;&amp;lt;artifactId&amp;gt;&lt;/span&gt;spring-ai-pdf-document-reader&lt;span class=&#34;nt&#34;&gt;&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nt&#34;&gt;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;c&#34;&gt;&amp;lt;!-- plus a chat model starter and an embedding model starter, e.g. OpenAI or Bedrock --&amp;gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-properties&#34; data-lang=&#34;properties&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;spring.datasource.url&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;jdbc:postgresql://localhost:5432/assistant&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;spring.ai.vectorstore.pgvector.initialize-schema&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;true&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;spring.ai.vectorstore.pgvector.index-type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;HNSW&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;spring.ai.vectorstore.pgvector.distance-type&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;COSINE_DISTANCE&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;na&#34;&gt;spring.ai.vectorstore.pgvector.dimensions&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s&#34;&gt;1536&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The starter auto-configures a &lt;code&gt;VectorStore&lt;/code&gt; bean using the &lt;code&gt;EmbeddingModel&lt;/code&gt; bean from your embedding starter. In production, prefer creating the schema with your migration tool (Flyway/Liquibase) and set &lt;code&gt;initialize-schema=false&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Vector Databases Explained</title>
				<link>https://samirsahoo.github.io/enterprise-ai/rag/vector-databases/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/rag/vector-databases/</guid>
				<description>&lt;h2 id=&#34;simple-definition&#34;&gt;Simple definition&lt;a class=&#34;heading-anchor&#34; href=&#34;#simple-definition&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A &lt;strong&gt;vector database&lt;/strong&gt; stores embeddings (vectors) together with their text and metadata, and answers one question fast: &lt;em&gt;&amp;ldquo;which stored vectors are closest to this query vector?&amp;rdquo;&lt;/em&gt; — usually with filters such as &amp;ldquo;only documents this user may see&amp;rdquo;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Advanced RAG: Hybrid Search, Reranking, Query Transformation and Agentic RAG</title>
				<link>https://samirsahoo.github.io/enterprise-ai/rag/advanced-retrieval/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/rag/advanced-retrieval/</guid>
				<description>&lt;h2 id=&#34;simple-definition&#34;&gt;Simple definition&lt;a class=&#34;heading-anchor&#34; href=&#34;#simple-definition&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Advanced RAG&lt;/strong&gt; adds steps before, during and after retrieval to find better context: fix the question (&lt;em&gt;pre-retrieval&lt;/em&gt;), search in more than one way (&lt;em&gt;retrieval&lt;/em&gt;), and filter and order what was found (&lt;em&gt;post-retrieval&lt;/em&gt;). &lt;strong&gt;Agentic RAG&lt;/strong&gt; goes further and lets an LLM decide when, where and how many times to search.&lt;/p&gt;</description>
			</item>
			<item>
				<title>GraphRAG and Knowledge Graphs</title>
				<link>https://samirsahoo.github.io/enterprise-ai/rag/graphrag/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/rag/graphrag/</guid>
				<description>&lt;h2 id=&#34;simple-definition&#34;&gt;Simple definition&lt;a class=&#34;heading-anchor&#34; href=&#34;#simple-definition&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A &lt;strong&gt;knowledge graph&lt;/strong&gt; stores facts as &lt;strong&gt;entities&lt;/strong&gt; (nodes: people, products, systems, contracts) and &lt;strong&gt;relationships&lt;/strong&gt; (edges: &lt;em&gt;owns&lt;/em&gt;, &lt;em&gt;depends on&lt;/em&gt;, &lt;em&gt;supplies&lt;/em&gt;). &lt;strong&gt;GraphRAG&lt;/strong&gt; uses such a graph — often built automatically from documents by an LLM — to retrieve connected facts and summaries that plain vector search cannot find.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Evaluating RAG and LLM Applications</title>
				<link>https://samirsahoo.github.io/enterprise-ai/rag/rag-evaluation/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/rag/rag-evaluation/</guid>
				<description>&lt;h2 id=&#34;simple-definition&#34;&gt;Simple definition&lt;a class=&#34;heading-anchor&#34; href=&#34;#simple-definition&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Evaluation&lt;/strong&gt; is measuring how well your AI system does its job, on a fixed set of test cases, with repeatable scores. For RAG you measure two things separately: did we &lt;strong&gt;find&lt;/strong&gt; the right information (retrieval), and did we &lt;strong&gt;use&lt;/strong&gt; it correctly (generation)?&lt;/p&gt;</description>
			</item>
			<item>
				<title>System Design: Enterprise Knowledge Assistant (RAG)</title>
				<link>https://samirsahoo.github.io/enterprise-ai/rag/case-study-knowledge-assistant/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/rag/case-study-knowledge-assistant/</guid>
				<description>&lt;h2 id=&#34;the-design-brief&#34;&gt;The design brief&lt;a class=&#34;heading-anchor&#34; href=&#34;#the-design-brief&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;&amp;ldquo;Design an AI assistant that lets 50,000 employees ask questions about internal policies, procedures and technical documentation, with answers grounded in company documents.&amp;rdquo;&lt;/em&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&lt;p&gt;This walk-through follows the &lt;a href=&#34;https://samirsahoo.github.io/enterprise-ai/review/architecture-review-framework/&#34;&gt;AI system design framework&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;1-requirements&#34;&gt;1. Requirements&lt;a class=&#34;heading-anchor&#34; href=&#34;#1-requirements&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;strong&gt;Functional&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Prompting vs RAG vs Fine-Tuning</title>
				<link>https://samirsahoo.github.io/enterprise-ai/foundations/customizing-models/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://samirsahoo.github.io/enterprise-ai/foundations/customizing-models/</guid>
				<description>&lt;h2 id=&#34;simple-definition&#34;&gt;Simple definition&lt;a class=&#34;heading-anchor&#34; href=&#34;#simple-definition&#34; aria-label=&#34;Link to this section&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;There are three main ways to make a general-purpose LLM useful for your business:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Prompting&lt;/strong&gt; — change the &lt;em&gt;instructions&lt;/em&gt; the model receives.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;RAG (retrieval-augmented generation)&lt;/strong&gt; — change the &lt;em&gt;knowledge&lt;/em&gt; the model receives, by retrieving relevant documents into the prompt.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Fine-tuning&lt;/strong&gt; — change the &lt;em&gt;model&amp;rsquo;s weights&lt;/em&gt; by training it further on your examples.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;A useful slogan: &lt;strong&gt;RAG for knowledge, fine-tuning for behaviour, prompting for everything first.&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
