{"id":12625,"date":"2024-09-29T09:03:28","date_gmt":"2024-09-29T07:03:28","guid":{"rendered":"https:\/\/www.juust.org\/?p=12625"},"modified":"2024-09-29T09:05:58","modified_gmt":"2024-09-29T07:05:58","slug":"build-a-free-rag-system-with-n8n","status":"publish","type":"post","link":"https:\/\/www.juust.org\/index.php\/build-a-free-rag-system-with-n8n\/2024\/09\/","title":{"rendered":"Build a Free RAG system with N8N"},"content":{"rendered":"\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#el-cheapo\">El Cheapo !?<\/a><\/li><li><a href=\"#rag-system-template\">N8N RAG system template<\/a><\/li><li><a href=\"#notes\">Notes<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<p>RAG Time ! Yesterday, Udemy had their Discount Day again. I am hooked to that. As usual, the platform offered countless courses at discounted prices, and this time was no different. As I was browsing through the offers, one specific course caught my eye: a course on <strong><a href=\"https:\/\/n8n.io\/\" target=\"_blank\" rel=\"noopener\">N8N<\/a><\/strong>, a powerful and flexible workflow automation platform. The <a href=\"https:\/\/www.udemy.com\/course\/introduction-to-ai-automation-with-n8n-and-langchain\/\" target=\"_blank\" rel=\"noopener\">Udemy N8N course<\/a> description immediately grabbed my attention, especially since it mentioned something about <strong>RAG<\/strong> (Retrieval-Augmented Generation). Given that I had been exploring RAG systems lately, I knew I had to get this course.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"el-cheapo\">El Cheapo !?<\/h3>\n\n\n\n<p>The price ? Just 14 dollars for the discounted course, a bargain in my opinion. <\/p>\n\n\n\n<p>I am quite the El Cheapo, I love services with free tiers. I try 5 services a week, on average, and I don&#8217;t feel like paying for them all, where I don&#8217;t use them in general after trying them for a week. I just want to see what a service is capable of, what the quality of their production is, what their use is in the general workflow. I don&#8217;t have the money to pay for every service, I don&#8217;t even have a credit card. So I am basically El Cheapo, you know, &#8220;Free&#8221; Willy ! Give me a free tier ! Same with Udemy courses, I buy one every month on average, I can wait for the Discount Days. El Cheapo loves Discount Days !<\/p>\n\n\n\n<p>I added it to my cart and purchased it. It turned out to be an excellent decision, as it gave me exactly what I was looking for. The course walked me through the process of setting up a simple <strong>RAG system<\/strong>, and even better yet : the course provided a ready-made template that I could use straight away. This gave me a solid foundation to build upon.<\/p>\n\n\n\n<p>However, there was one small issue. The solution presented in the course relied on OpenAI, a paid service. I don&#8217;t have a credit card. So I tried some other services looking for services with a free tier. My goal was to set up a RAG system that could operate for free, at least within the free tiers of certain services. So, I decided to tweak the template and make some adjustments.<\/p>\n\n\n\n<p>After some miserable fails, I managed to get the system working with three tools with a free tier: <strong><a href=\"https:\/\/qdrant.tech\/\" data-type=\"link\" data-id=\"https:\/\/qdrant.tech\/\" target=\"_blank\" rel=\"noopener\">Qdrant<\/a><\/strong>, <strong><a href=\"https:\/\/huggingface.co\/\" data-type=\"link\" data-id=\"https:\/\/huggingface.co\/\" target=\"_blank\" rel=\"noopener\">HuggingFace<\/a><\/strong>, and <strong><a href=\"https:\/\/groq.com\/\" data-type=\"link\" data-id=\"https:\/\/groq.com\/\" target=\"_blank\" rel=\"noopener\">Groq<\/a><\/strong>. Of course, this modification meant that the system now had some limitations compared to using a paid service. But the good news was that I had a functioning RAG solution that operated entirely for free (within the free limits of these services).<\/p>\n\n\n\n<p>The result? A local, free AI-powered <strong>RAG system<\/strong>. While it may not have the power or scalability of the paid version, it\u2019s a nice solution for small-scale use or for experimenting without incurring any costs. <\/p>\n\n\n\n<p>I tested it on the board meeting notes of our charity and it works like a charm. It is excellent for that kind of thing. You can chat with your own archive. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"rag-system-template\">N8N RAG system template<\/h3>\n\n\n\n<p>You can download this <a href=\"https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/FreeRag.zip\"><strong>N8N Free Rag system template<\/strong><\/a>. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/FreeRag.zip\"><img fetchpriority=\"high\" decoding=\"async\" width=\"381\" height=\"132\" src=\"https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/download.jpg\" alt=\"download N8N AI RAG template\" class=\"wp-image-12640\" srcset=\"https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/download.jpg 381w, https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/download-300x104.jpg 300w\" sizes=\"(max-width: 381px) 100vw, 381px\" \/><\/a><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<p>It is a zipped JSON file.<\/p>\n\n\n\n<p>SHA1 checksum 91c573f0b8de70ea36e15c74772920170699324a<\/p>\n<\/div>\n<\/div>\n\n\n\n<p>You can unzip and load it in N8N. Once you setup the credentials, you can easily load your own Word documents into an AI-powered Q&amp;A system. The process is simple and efficient. <\/p>\n\n\n\n<p>In the first step, you can upload a Word document directly from your <strong>Google Drive<\/strong> into your <a href=\"https:\/\/www.juust.org\/index.php\/rag-is-hot-a-new-business-trend\/2024\/09\/\"><strong>RAG (Retrieval-Augmented Generation)<\/strong> <\/a>database. This allows you to store and organize your own content for retrieval-based AI interactions.<\/p>\n\n\n\n<p>Then, in step two, the magic happens. Using <strong>Groq<\/strong>, you can engage in meaningful conversations based on the content of your uploaded documents. This means you&#8217;re not just chatting with an AI in a generic way; you&#8217;re actually able to query the system using the information from your own files. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/FreeRag.zip\"><img decoding=\"async\" width=\"1024\" height=\"473\" src=\"https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/afbeelding-46-1024x473.png\" alt=\"Free Rag AI N8N template\" class=\"wp-image-12633\" srcset=\"https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/afbeelding-46-1024x473.png 1024w, https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/afbeelding-46-300x139.png 300w, https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/afbeelding-46-768x355.png 768w, https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/afbeelding-46-1536x710.png 1536w, https:\/\/www.juust.org\/wp-content\/uploads\/2024\/09\/afbeelding-46.png 1669w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"notes\">Notes<\/h3>\n\n\n\n<p>Disclaimer: <em>&#8220;It works on my machine&#8221;<\/em> &#x1f60a;. I\u2019ve done my best to ensure that this N8N Free RAG template runs smoothly, it works like a charm on my laptop. And I trust it will work just as well on yours. That said, one of the more time-consuming steps is setting up the necessary credentials. Integrating services like Google Drive requires obtaining API keys and handling <strong>Google OAuth<\/strong> consent to access your documents. While the process can seem a bit tedious, it\u2019s essential to ensure secure and seamless access to your data. Once you\u2019ve got those credentials in place, the rest of the system falls into place effortlessly.<\/p>\n\n\n\n<p>I hope you find this setup useful for your own AI-powered document workflows. Whether you\u2019re using it to retrieve insights from your own files or building a custom knowledge assistant, this free RAG template provides a solid starting point. Good luck, and I hope you enjoy building and experimenting with this system as much as I did!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I made my first RAG system in N8N with all free tier services, so here&#8217;s the N8N template for a Free Rag AI system.<\/p>\n","protected":false},"author":5796,"featured_media":12636,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"disabled","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[484,4,11],"tags":[483],"class_list":["post-12625","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-juust","category-seo-tool","tag-ai"],"_links":{"self":[{"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/posts\/12625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/users\/5796"}],"replies":[{"embeddable":true,"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/comments?post=12625"}],"version-history":[{"count":6,"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/posts\/12625\/revisions"}],"predecessor-version":[{"id":12642,"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/posts\/12625\/revisions\/12642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/media\/12636"}],"wp:attachment":[{"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/media?parent=12625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/categories?post=12625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.juust.org\/index.php\/wp-json\/wp\/v2\/tags?post=12625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}