<?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 The Smoking Duck Blog</title><link>https://blog.aabouzied.com/blog/rag/</link><description>Recent content in Rag on The Smoking Duck Blog</description><generator>Hugo</generator><language>en-US</language><copyright>Copyright © 2021, Ahmed Abouzied.</copyright><lastBuildDate>Wed, 07 Oct 2026 04:34:55 +0200</lastBuildDate><atom:link href="https://blog.aabouzied.com/blog/rag/index.xml" rel="self" type="application/rss+xml"/><item><title>Let’s build a Golang knowledge specific RAG system with a local llama LLM</title><link>https://blog.aabouzied.com/golang-knowledge-specific-rag/</link><pubDate>Fri, 27 Dec 2024 09:40:45 +0000</pubDate><guid>https://blog.aabouzied.com/golang-knowledge-specific-rag/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;In this article, we’re going to build a Golang knowledge specific RAG AI Chat system using open source and free components with the ability to make more documents available for it. This RAG system can be used for example for internal documentation, where we can make a chat LLM answer questions based solely on our documentation. Also, it means that it will be able to answer more specific questions that general use case chat LLMs fail with due to not being trained on the internal specific data set.&lt;/p&gt;</description></item><item><title>On Fact-checking RAG Outputs</title><link>https://blog.aabouzied.com/on-fact-checking-rag-outputs/</link><pubDate>Thu, 26 Dec 2024 18:36:34 +0000</pubDate><guid>https://blog.aabouzied.com/on-fact-checking-rag-outputs/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;In this article, we explore the challenges and methods of &lt;strong&gt;fact-checking RAG&lt;/strong&gt;&lt;/p&gt;&#10;&lt;p&gt;(Retrieval-Augmented-Generation) output.&lt;/p&gt;&#10;&lt;p&gt;We begin with a &lt;strong&gt;philosophical rant&lt;/strong&gt; about what exactly a fact is. And why I think knowledge is better represented in an “index” &lt;strong&gt;(encyclopedia) rather than in a “knowledge graph”&lt;/strong&gt;.&lt;/p&gt;&#10;&lt;p&gt;Following that, we go into &lt;strong&gt;practical experiments&lt;/strong&gt;, including:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Implementing a &lt;strong&gt;fact extractor&lt;/strong&gt; using &amp;ldquo;GPT-4o-mini&amp;rdquo;.&lt;/li&gt;&#10;&lt;li&gt;Utilizing &amp;ldquo;DeBERTa&amp;rdquo; for &lt;strong&gt;detecting contradictions&lt;/strong&gt; between two sentences.&lt;/li&gt;&#10;&lt;li&gt;Building a &lt;strong&gt;fact-checker pipeline&lt;/strong&gt;.&lt;/li&gt;&#10;&lt;li&gt;Finally, we test these tools in a controlled environment using a single-document Retrieval-Augmented Generation (RAG) setup to &lt;strong&gt;detect if the RAG system has given us false information&lt;/strong&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;strong&gt;The code accompanying this article can be found&lt;/strong&gt; &lt;a href="https://github.com/ahmedaabouzied/rag-systems/tree/main/fact_checking"&gt;&lt;strong&gt;here on Github.&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>An Experiment with RAG Search Accuracy</title><link>https://blog.aabouzied.com/experiment-rag-search-accuracy/</link><pubDate>Fri, 20 Dec 2024 06:30:13 +0000</pubDate><guid>https://blog.aabouzied.com/experiment-rag-search-accuracy/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;&#10;&lt;p&gt;In a previous article, we explored the foundations of a basic Retrieval-Augmented Generation (RAG) system by building a straightforward implementation and loading it with articles from the Go blog. This simple setup allowed us to test the concept of enhancing search accuracy by combining a document corpus with advanced retrieval techniques.&lt;/p&gt;&#10;&lt;p&gt;Now, we’re taking that experiment further. In this article, we’ll delve into optimizing RAG search accuracy through more advanced techniques and comparisons. Specifically, we’ll discuss:&lt;/p&gt;</description></item></channel></rss>