<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Fact-Checking on The Smoking Duck Blog</title><link>https://blog.aabouzied.com/blog/fact-checking/</link><description>Recent content in Fact-Checking 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/fact-checking/index.xml" rel="self" type="application/rss+xml"/><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></channel></rss>