<?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 Samarthya</title><link>https://samarthya.me/tags/rag/</link><description>Recent content in Rag on Samarthya</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© Samarthya 2018-2026. All rights reserved.</copyright><lastBuildDate>Mon, 26 Oct 2026 18:30:00 -0400</lastBuildDate><atom:link href="https://samarthya.me/tags/rag/index.xml" rel="self" type="application/rss+xml"/><item><title>AI in practice, part 4: From RAG to tools and agents</title><link>https://samarthya.me/posts/ai-in-practice-4-tools-and-agents/</link><pubDate>Mon, 26 Oct 2026 18:30:00 -0400</pubDate><guid>https://samarthya.me/posts/ai-in-practice-4-tools-and-agents/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; RAG lets a model read what it didn&amp;rsquo;t know. Tools let it do things. An agent is what you get when the model&#10;decides, step by step, which tools to use until the job is done.&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;Three levels of &amp;ldquo;the model knows something&amp;rdquo;&#10; &lt;div id="three-levels-of-the-model-knows-something" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#three-levels-of-the-model-knows-something" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;strong&gt;Only its training.&lt;/strong&gt; The model answers from patterns learned before its cutoff. It can&amp;rsquo;t see your files&#10;and doesn&amp;rsquo;t know today&amp;rsquo;s date unless you tell it.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Retrieval (RAG).&lt;/strong&gt; Your application searches your documents and pastes the relevant passages into the&#10;prompt. The model reads, then answers. I built one of these&#10;&lt;a href="https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/" &gt;here&lt;/a&gt;. The &lt;em&gt;application&lt;/em&gt; decides what to retrieve.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Tools.&lt;/strong&gt; The model itself asks for something to be done: &amp;ldquo;search the docs for X&amp;rdquo;, &amp;ldquo;run this query&amp;rdquo;,&#10;&amp;ldquo;create the ticket&amp;rdquo;. The &lt;em&gt;model&lt;/em&gt; decides when and how; your application carries it out.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&#10;&lt;h2 class="relative group"&gt;Function calling, step by step&#10; &lt;div id="function-calling-step-by-step" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#function-calling-step-by-step" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;With tool use (often called &lt;em&gt;function calling&lt;/em&gt;), you describe each tool to the model: a name, a description&#10;and a JSON schema for its arguments.&lt;/p&gt;</description></item><item><title>Building a Practical Retrieval-Augmented Personal Assistant (RAG)</title><link>https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/</link><pubDate>Tue, 11 Nov 2025 12:00:00 +0000</pubDate><guid>https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/</guid><description>&lt;figure&gt;&lt;img&#10; class="my-0 rounded-md"&#10; loading="lazy"&#10; decoding="async"&#10; fetchpriority="auto"&#10; alt=""&#10; width="600"&#10; height="600"&#10; src="https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/rag.png"&#10; srcset="https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/rag.png 800w, https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/rag.png 1280w"&#10; sizes="(min-width: 768px) 50vw, 65vw"&#10; data-zoom-src="https://samarthya.me/posts/building-a-practical-retrieval-augmented-personal-assistant-rag/rag.png"&gt;&lt;/figure&gt;&#10;&lt;p&gt;The elements of information discussed here are all present in my &lt;a href="https://github.com/samarthya/rag-one.git" target="_blank" rel="noreferrer"&gt;github repository&lt;/a&gt;.&lt;/p&gt;&#10;&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;&#10; with &lt;code&gt;Ollama&lt;/code&gt;, &lt;code&gt;LangChain&lt;/code&gt;, and &lt;code&gt;Chroma&lt;/code&gt;&#10;&lt;/div&gt;&#10;&#10;&#10;&lt;h2 class="relative group"&gt;1. Why I Built This&#10; &lt;div id="1-why-i-built-this" class="anchor"&gt;&lt;/div&gt;&#10; &#10; &lt;span&#10; class="absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none"&gt;&#10; &lt;a class="text-primary-300 dark:text-neutral-700 !no-underline" href="#1-why-i-built-this" aria-label="Anchor"&gt;#&lt;/a&gt;&#10; &lt;/span&gt;&#10; &#10;&lt;/h2&gt;&#10;&lt;p&gt;Large Language Models are powerful, but they hallucinate and forget your private knowledge. We set out to build a small, local Retrieval-Augmented Generation (RAG) assistant that:&lt;/p&gt;</description></item></channel></rss>