<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Alex McLintock on Medium]]></title>
        <description><![CDATA[Stories by Alex McLintock on Medium]]></description>
        <link>https://medium.com/@alexmc6?source=rss-4153f47a9ca9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Ta3CtWur9RRtE0P-.jpg</url>
            <title>Stories by Alex McLintock on Medium</title>
            <link>https://medium.com/@alexmc6?source=rss-4153f47a9ca9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:48:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexmc6/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[RAG — The hyped up variant of GenAI chatbots]]></title>
            <link>https://medium.com/@alexmc6/rag-the-hyped-up-variant-of-genai-chatbots-8d615690e8d2?source=rss-4153f47a9ca9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d615690e8d2</guid>
            <dc:creator><![CDATA[Alex McLintock]]></dc:creator>
            <pubDate>Mon, 24 Jun 2024 08:57:55 GMT</pubDate>
            <atom:updated>2024-06-24T08:57:55.332Z</atom:updated>
            <content:encoded><![CDATA[<h3>RAG — The hyped up variant of GenAI chatbots</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LhePz4majDRd-2K_MK_3Pw.jpeg" /><figcaption>RAG Dolls?</figcaption></figure><p>It seems like you can’t go anywhere without hearing about Generative AI nowadays. Rather than video, pictures, or sound, I normally work with Large Language Models which are trained from large amounts of public text. These LLMs can be used to summarise documents, generate documents, and run chatbots. It is this last thing that I am most interested in: chatbots for business use. Imagine this scenario:</p><pre>CHATBOT: Welcome to the Acme Company Website. How can I help you today?<br>USER: Well, I want to learn how to use the Acme Alpha Widget?<br>CHATBOT: For information about the Alpha Widget I have a manual pdf and <br>also a training video. <br>USER: How do I shutdown the Widget Alpha Widget?<br>CHATBOT: In order to shutdown the Alpha Widget you must first check that <br>no one is using it. Then you initiate the shutdown proceedure by executing <br>this admin command...</pre><p>This made up example may be a bit silly but I hope it shows how you might want to do something similar in your own company. You might have a large amount of manuals, or procedures, or records, or any number of documents. It is easy to get a working LLM Chatbot, but it was not trained on your company documents. Or your generic LLM might “hallucinate” and come back with something that sounds good, but was made up.</p><p>You basically want to feed your private company documents to the chatbot so that the information inside can be used in the chat.</p><p>There are a number of ways of doing this but the first two are rejected fairly quickly in most cases:</p><ul><li>Retrain a whole LLM but include your documents as well</li><li>Fine Tune the training of an LLM to add some more documents to the existing trained material.</li></ul><p>These are both expensive and require significant GenAI skills and resources.</p><p>The third option is what I will briefly describe here:</p><ul><li>RAG — Retrieval Augmented Generation</li></ul><h3>RAG</h3><p>At its very simplest RAG requires two main data pipelines.</p><ol><li>One where you take your private documents and ingest them into a knowledgebase which is usable by the chatbot</li><li>One which listens for user input, checks in the knowledgebase for anything relevant, and feeds the relevant material to the chatbot LLM along side the query so that it will generate a new, better response.</li></ol><p>The ingestion pipeline needs to chop up the source text into chunks and convert them into a format which can be consistently used by the rest of the AI system. Typically this involves converting the words into tokens, and then into numbers through embeddings. (Think of this as an old style code book where you look up a word and get a number to represent it). It puts this information in the knowledgebase.</p><p>The knowledgebase is generally a type of database technology called a “VectorDB”. This is particularly good for storing the representations of text used inside AI systems. In particular you can ask a VectorDB “what text is close to this”.</p><p>There are opensource VectorDBs such as Chroma, and also more commercial SaaS offerings like Pinecone.</p><p>The generation process which takes the user input and goes through a number of transformations which includes:</p><ol><li>Retrieving relevant information from the knowledgebase</li><li>Augmenting the query with the retrieved information</li><li>Generating a chatbot response with the augmented query and unmodified LLM.</li></ol><p>In reality things are a lot more complicated than that.</p><h3>Next</h3><p>In my next blog I will talk a bit about localGPT which is a python system for doing basic RAG</p><h3>Links</h3><ul><li><a href="http://trychroma.com/">http://trychroma.com</a>/</li><li><a href="https://www.pinecone.io/">https://www.pinecone.io/</a></li><li><a href="http://bit.ly/m/alexmclintock/">http://bit.ly/m/alexmclintock/</a></li><li><a href="https://www.linkedin.com/company/alephant/">https://www.linkedin.com/company/alephant/</a></li></ul><h3>Credits</h3><p>All words and mistakes, <a href="http://bit.ly/m/alexmclintock/">Alex McLintock</a>, <a href="https://www.linkedin.com/company/alephant/">Alephant</a></p><p>Please <a href="http://bit.ly/m/alexmclintock/">contact Alex</a> should you wish help with your data systems. Consultancy and Engineering.</p><p>Photo by David López: <a href="https://www.pexels.com/photo/brown-purple-red-knitted-doll-65451">https://www.pexels.com/photo/brown-purple-red-knitted-doll-65451</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d615690e8d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>