This RAG AI Agent with n8n + Supabase is the Real Deal

  Рет қаралды 119,047

Cole Medin

Cole Medin

Күн бұрын

Пікірлер: 504
@bizooku
@bizooku 8 күн бұрын
You are priceless my friend. I am letting everyone I know, know about your channel. Your videos are concise, thoughtful and your enthusiasm is inspiring!!
@ColeMedin
@ColeMedin 5 күн бұрын
I appreciate the kind words and support! Thank you very much!
@beatthetar
@beatthetar 2 ай бұрын
Thank you for this video. I've been going through all these n8n tutorials on KZbin, and this one nailed the exact 'yeah, but' gaps I had when trying to put everything together. The memory storage, the data garbage collection-nobody else seems to go over these details, probably because they're trying to sell services to "figure this out" for you. Really appreciate you putting this info out there for everyone. You just earned a sub!
@ColeMedin
@ColeMedin 2 ай бұрын
I'm glad - thank you so much!!
@tutorialmasterbrasil
@tutorialmasterbrasil 22 күн бұрын
Simply Amazing Brother, Thank you sooo much! And of course, it will be great to see more content related to RAG implementations using this setup.
@ColeMedin
@ColeMedin 22 күн бұрын
Thank you, I appreciate it a lot! Yes, more RAG content coming soon!
@arthurbaggio1427
@arthurbaggio1427 8 күн бұрын
Amazing content, man! Appreciate it very much. Just a tip for a problem I found: if the document is large enough to add more than one chunk to the vector store, when updated, the node that deletes these chunks returns more than one object, which causes to duplicate (or triplicate, and so on) items from this point forward on the automation. A quick fix is adding an aggregate node after the node that deletes the old docs from the vector store.
@ColeMedin
@ColeMedin 4 күн бұрын
Thank you very much! And great tip - I appreciate you sharing! :)
@mahiaravaarava
@mahiaravaarava 4 ай бұрын
This integration of RAG AI Agents with platforms like n8n and Supabase is indeed a game changer! I love how it streamlines complex processes into manageable workflows.
@ColeMedin
@ColeMedin 4 ай бұрын
I'm glad you found this useful! I agree it's a gamechanger - I've spent way too much time in the past building relatively complex AI Agents that I now know I wouldn't even need to code! haha
@blossom_rx
@blossom_rx 4 ай бұрын
I was sceptic first, as like you say: many people just talk and do not actually teach. Blessings for you and this channel. Ff you keep that up you will be successful. This was a good and clear explanation.
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you very much - that seriously means a lot! I'm glad everything was clear as well! That's actually my primary goal :)
@michael_guiao
@michael_guiao 4 ай бұрын
Totally agree on channels not talking about keeping their databases duplicate free. Thanks for showing.
@ColeMedin
@ColeMedin 4 ай бұрын
Of course Michael, I appreciate you calling that out!
@patruff
@patruff 26 күн бұрын
Light RAG or graph database handles duplications for free
@PauloRicardodeSouza-f6r
@PauloRicardodeSouza-f6r 2 ай бұрын
Perfect video my brother. I'm part of a large community here in Brazil and I will recommend it to colleagues. The video is so good that with my intermediate English, I was able to understand it perfectly. Thank you for this content!
@ColeMedin
@ColeMedin 2 ай бұрын
Thanks for sharing! I appreciate it a ton man!
@pumpituphomeboy
@pumpituphomeboy 4 ай бұрын
Amazing video Cole. This video is in a different league to the vast majority of other so called content creators who are more about getting clicks for headlines. They nearly ALWAYS show workflows that are missing the small details needed to create a real-world production ready agent. Subbed and liked. Looking forward to future content from you.
@ColeMedin
@ColeMedin 4 ай бұрын
@@pumpituphomeboy Thank you very much, that means a ton! That's exactly what I'm aiming for - hitting the small details that make all the difference :)
@Flo-bk3fj
@Flo-bk3fj 4 ай бұрын
nice! one pumpit... xD
@kel78v2
@kel78v2 2 ай бұрын
Your tutorial are definitely better compared to others I've seen especially with supabase vector table maintenance in general. Thanks
@ColeMedin
@ColeMedin 2 ай бұрын
Thank you very much! :D
@alex_vis_12
@alex_vis_12 3 ай бұрын
Another thing I learned from your video is this: N8N has its own chatbot building system. I used Flowise for that. For me it would be interesting to see a video explaining the differences (and similarities) between N8N and Flowise in regards to AI agent/chatbot functionalities. Thanks again for the top-notch content!
@ColeMedin
@ColeMedin 3 ай бұрын
You are welcome and thank you for the suggestion! I know a lot of individuals who love using Flowise with n8n, so I do have this on my list of content for the future!
@TomWhi
@TomWhi Ай бұрын
Blimey, this is a great tutorial. I’ve seen a couple of others on the same topic but I like the simplicity of yours. I’ll definitely give it a go!
@mtofani91
@mtofani91 3 ай бұрын
Man i just discovered your content. You are a gem :) Thanks. I've work and test some things in n8n few years ago, but it's great to see what it can be done RN.
@ColeMedin
@ColeMedin 3 ай бұрын
Thanks dude, that means a lot to me! That's awesome you were testing things out with N8N even a few years ago. I didn't even know about it back then!
@th3codefather
@th3codefather 4 ай бұрын
oh my days dude you have really REALLY sorted me out with this vid. So grateful.
@ColeMedin
@ColeMedin 4 ай бұрын
Haha I'm glad to help man! Thank you!
@bobsov534
@bobsov534 4 ай бұрын
Great walkthrough. For next topic, it will be cool to show a custom react application where chatbot is hosted and connected to n8n behind the scene. The file uploads, processing all that smooth connection that can be shown.
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you and I appreciate the suggestion! I will certainly be extending this with a frontend in the future, probably with React!
@AndrewsPanda
@AndrewsPanda 3 ай бұрын
I second this. A video for a react front end would be amazing
@tamaraoweibo
@tamaraoweibo 2 күн бұрын
​@@ColeMedin still waiting for that Tutorial
@e11e7en
@e11e7en 3 ай бұрын
15:02 Thank you for the great tutorial! Definitely keep it up. In case it helps you as an educator, the Document Loader Options (15:02) were vital for the success of the tutorial, but you went past them so fast I didn't realize they were there! In any case, I learned a ton from investigating that myself, and from the tutorial in general. Again, thank you!
@ColeMedin
@ColeMedin 3 ай бұрын
Thank you very much and I appreciate you calling that out a ton! It's important for me to not miss anything big and I agree I should have covered the document loader options.
@unitedweb6059
@unitedweb6059 4 ай бұрын
Super high quality content. Unlike the rest, this really helped. Thanks for sharing.
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you, that means a lot!! My pleasure :)
@MichaelSmithsav
@MichaelSmithsav 4 ай бұрын
This was a really good tutorial. You delivered everything you promised, it was easy to follow and beats the hell out of the RAG agents I've built in the past. Thank you.
@MichaelSmithsav
@MichaelSmithsav 4 ай бұрын
How would you set up the initial vector database with recursive uploads of files from Google Drive Folders to be inserted into the vector database? This would give you access to your existing files and then updates as everything is updated over time. Would be super useful for things like Standard Operating Procedures.
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you Michael - that means a lot!
@ColeMedin
@ColeMedin 4 ай бұрын
This is a great question! You could create a separate n8n workflow that you run once that would go through all the folders in the Google Drive you want and index them into your vector DB. That's definitely doable with n8n. Then going forward the workflow I show in the video would handle new files or updated files. The other option is you could create a new folder for RAG that you use in the workflow, and then just copy your SOPs or other files from wherever else you store them into your new folder for RAG (then potentially delete the original copies after). Not an ideal solution if you don't want to shuffle things around but that would be the quickest!
@TheThickPizza
@TheThickPizza 3 ай бұрын
This is a great resource. Thanks for posting! One suggestion I would make is to add descriptive chapters. I find I have to seek around a bit to get to the parts I need.
@ColeMedin
@ColeMedin 3 ай бұрын
Thank you and I appreciate the suggestion! I've been doing it for my more recent videos, but I honestly should go back and do it for this video. I'll be sure to take care of that!
@TheThickPizza
@TheThickPizza 3 ай бұрын
@@ColeMedin Thanks! I just came back to the video to double-check something and having the chapters was super helpful.
@DatNguyen-br3qd
@DatNguyen-br3qd 2 ай бұрын
brother, you are the best of all KZbinr about this n8n
@ColeMedin
@ColeMedin 2 ай бұрын
Thanks man - that means a lot! :D
@CameronGolinsky-op1et
@CameronGolinsky-op1et 4 ай бұрын
This is a really thorough walk through for documents. How would this be altered if you were wanting to embed database data from a table? This is where I keep running into problems... I really love the enthusiasm and clarity you share with each video! Thank you for all the value!
@ColeMedin
@ColeMedin 4 ай бұрын
Thanks Cameron, I appreciate it a lot! Great question! There are a lot of ways to embed a table. The easiest way would probably be to turn the data into a CSV and split the CSV into chunks (making sure to not split in the middle of a row) and ingest that into the vector database. Another option is to ingest each record or a set of records as raw text into the vector database. Hopefully that helps! What problems specifically have you run into?
@CameronGolinsky-op1et
@CameronGolinsky-op1et 4 ай бұрын
@@ColeMedin Thank you so much for the reply. This might seem very long and like i am taking advantage of your generosity of time. I need two tables. One table that essentially would house my company wiki database (each row is it's own article, persay and thankfully this has been able to be sent one row at a time via webhook), and then another that would hold the extracted data from supplementary pdfs and documents. The idea would be that if the wiki table doesn't have the answer, the bot could then search the supplementary table. The problem I'm running into is that when I follow the steps of your video, the table is saved as documents and will then only ever try to search a table called "documents" (even if it is renamed). If I add another table, no matter what I set the vector store as, it always looks for "documents". I was able to get some SQL code that created more tables and gave me some new functions, but no matter what, N8N will just try to look in "documents" and will say my new functions failed. I'm considering moving to pinecone or something else, but the idea of using postgres was very appealing. I fully support the work you are doing and am certain the best is yet to come!
@ColeMedin
@ColeMedin 4 ай бұрын
Of course and no worries, I'm glad to help! Your use case sounds awesome and it's definitely something you could accomplish with n8n and Supabase. It's hard to be concise in explaining this, but essentially you would replace the RAG tool I have in the video for the agent and replace it with two n8n workflow tools that would each search a different table with RAG given a query. So you would instruct the agent to use the workflow that queries the wiki table first, and if it fails to find the answer then call the tool to query the supplementary table. Does that make sense?
@discotek1198
@discotek1198 3 ай бұрын
man, thank you! new subscriber here. Keep doing great job. You have a special gift and your videos are pleasure to watch.
@ColeMedin
@ColeMedin 3 ай бұрын
Wow thank you so much for the very kind words! You bet man!
@0xBerto
@0xBerto Ай бұрын
Would love to see this setup with the change being local host. Like port forwarding the thing (if needed) etc. so that the agent (although running locally) can be access on the internet or integrated via api or embed
@LauraKayeChamberlain-vb7dd
@LauraKayeChamberlain-vb7dd 3 күн бұрын
Same!
@howardwong2181
@howardwong2181 4 ай бұрын
Thank you for demonstrating a no-code RAG implementation. It's quite impressive! However as some of the comments mentioned local RAG is a realistic requirement due to security concerns. However for a true real world rollout, there's going to be a need for a guardrail framework tied to role-permissions, and a test framework for validating expected / unexpected outcomes and I believe that will inevitably lead to a code-based implementation. For now, the n8n platform is great for prototyping different backends / engines. This was inspiring nonetheless!
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you Howard! You make great points! For a lot of applications, there truly is a lot that goes into making them production ready with all the security/testing requirements. n8n is suitable for some applications (such as many website chatbots), but others you are right in saying the requirements will often lead to the need for a coded solution.
@LuisG-YT
@LuisG-YT 2 ай бұрын
Thank you for all the awesome content!
@ColeMedin
@ColeMedin Ай бұрын
You are most welcome!
@mba-2663
@mba-2663 14 күн бұрын
Top tier content. Thank you man!
@ColeMedin
@ColeMedin 13 күн бұрын
I appreciate it - you are so welcome! :)
@MattDoman
@MattDoman 3 ай бұрын
Thanks!
@ColeMedin
@ColeMedin 3 ай бұрын
Thank you so much for your support!!
@abrahamroa118
@abrahamroa118 4 ай бұрын
Very good video, great for when you think about moving into production. Thanks for sharing.
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you, Abraham - my pleasure!! :)
@mediapixelbr
@mediapixelbr 4 ай бұрын
Comrade, you really are fantastic with N8N! I really appreciate you sharing your knowledge here on YT. Another "follower". Congratulations. I am from BRAZIL
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you very much, that means a lot to me! 😃 I'm jealous you're in Brazil! Where I'm from (Midwest in the US) it's starting to get cold...
@AutoMateLabs_br
@AutoMateLabs_br 4 ай бұрын
You're my HERO!!! Thanks for this Masterclass!!!
@ColeMedin
@ColeMedin 4 ай бұрын
Of course, I'm glad you found it useful!! :)
@dario_real
@dario_real 22 күн бұрын
amazing, thanks, just what I was looking for
@ColeMedin
@ColeMedin 22 күн бұрын
Glad to hear it! You bet man!
@artemazing
@artemazing 4 ай бұрын
I've watche a lot of videos about n8n agents - most of them bs that has no real application for business. But your video and blueprint is totally gem! tysm
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you, that means a lot to me!! I'm glad what I have here has real business application for you 😄
@masdiqie
@masdiqie Ай бұрын
tried, it works! thank you
@ColeMedin
@ColeMedin Ай бұрын
Awesome you bet!
@alex_osti
@alex_osti 4 ай бұрын
Great work, Cole! Thank you for sharing.
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you Alex, my pleasure!!
@redneq
@redneq 4 ай бұрын
We need to focus on Localization of RAG and creating STACKS to host/use locally for the utmost security. Let's not forget you're training theses companies data for them by sending all your content into cloud services.
@ColeMedin
@ColeMedin 4 ай бұрын
Great point! I definitely want to work towards making more content around localizing the entire system. Local setup is a bit more involved for things like the database which is why the full stack isn't local at this point, but I agree fully local is ideal!
@redneq
@redneq 4 ай бұрын
@@ColeMedin While I'm a bit looney, using Redis, Ollama, Postgresql, n8n in a compose file setup properly could achieve exactly this though right?
@ColeMedin
@ColeMedin 4 ай бұрын
@@redneq I haven't fully attempted or seen this built out before but yes this would be possible! And you certainly aren't loony haha, this sounds great and I know it's what a lot of people are looking for. Lot I'm working on behind the scenes related to local RAG!
@Flo-bk3fj
@Flo-bk3fj 4 ай бұрын
@@redneq I do this every day, every nigt when i have time besides my fulltime job.. and what you will expirience is. That it is not building the prncibles and showing a bit nonsense, it is the companys data. You must show up with a solution for the real problem, its the data! This advice here shows just that he has just no idea of what hes doing.
@yashinfinite8338
@yashinfinite8338 4 ай бұрын
Awesome observation
@saxtant
@saxtant 4 ай бұрын
So it turns out, your context window is the same with or without rag according to Claude, which means all rag can do is help you choose your context segments that will be handed to the llm in text format for content larger than the context. I don't really need rag, I just need a method to isolate segments from my total context related to a particular query and then use the reduced context for it, this is a little slower, but it's going to better than rag at choosing segments. Don't pay for databases, you have a specialist at your disposal, use them.
@ColeMedin
@ColeMedin 4 ай бұрын
Yes that is true that RAG is "just" a way to get specific context into the LLM from a knowledgebase and it doesn't actually extend the context window of the LLM! RAG is one of many methods to isolate segments from total context as you mentioned, and is generally considered the best/easiest to implement option. I'm curious to hear more about what exactly you are thinking of implementing. Sounds interesting!
@saxtant
@saxtant 4 ай бұрын
@@ColeMedin I don't need an LLM to be a knowledge base, databases or even text files are much better at being accurate. Where LLMs are useful are being an interface to a database, my path is to create tools that can be 100% accurate rather than super fast, because of 2 main reasons, 1: agents will destroy themselves and do so far too easily because they don't really know where they messed up, even if they only do it 1% of the time, agents feeding off themselves will accumulate errors more than a quantum computer. 2: inference speeds will continue to become faster, so agents should spend a few more turns on verifying their every move when they interact with deterministic tools like a database, then you can leave them to complete a large task and not have it produce unusable garbage. Well, that's the plan anyway.
@ColeMedin
@ColeMedin 4 ай бұрын
@@saxtant Yeah I see where you are coming from! How would you handle a large amount of unstructured data though? If you have a bunch of let's say meeting notes or standard operating procedures, it would be hard to get an LLM to query for those in a SQL database or text files without having RAG to do a similarity search and pick out what matters for the user question. What are your thoughts there? I'm really curious to know!
@saxtant
@saxtant 4 ай бұрын
@@ColeMedin I would prefer not to let it get that far, I mean it's true my house is a complete mess, but I would prefer not to have a large pile of unstructured data and actually I don't, I may not have the same requirements as others, but my current method is all about having an LLM actually use a scratchpad for unstructured data, only for it to be sanitized in the background and removed from the scratchpad to keep the context small.
@lancerben4551
@lancerben4551 4 ай бұрын
I'm working very hard to do exactly this. I made a script I call context manager which serves to create the memory of the LLM for a specific task. I'm working with large modules and applications. The context manager basically parses my code and then I select which part of the code I want to send to the LLM to reduce hallucinations and increase coherence and increase the accuracy of the response. My goal is to have this context determined by an AI that will read the script and select which part of the code are relevant to include in the coding LLM 'a context. The goal is to separate task on different calls as the more specific the question is and the more focused the context is better is the response. So far I'm doing the context creation manually which is of course a pain. I think. I'm getting close to getting it to work. The biggest issue I have is that LLM are incredibly inconsistent even with ultra clear instructions. Claude which is by far the best I've tried for coding does not follow instructions well. I get more structured responses from GPT4o latest but it is not on the same level as Claude for coding tasks. I'm also working on an auto merging software that takes the code output and parses it for commands. Which then the program uses to accurately merge the code snippet into the original. I use LibCST for the operation. I'm Getting close to getting it work correctly but still lots of little kinks to fix. Anyone working on this who wants to collaborate I'd be interested. Btw I'm not a programmer I'm an engineer with a knack for creation and understanding complex things. I rely on AI to write code. I am managing it and figuring out the problems and explaining it how things should work. So a talented coder could really help advance the project.
@zensajnani
@zensajnani 3 ай бұрын
love these videos thank you for the value!
@ColeMedin
@ColeMedin 3 ай бұрын
You are so welcome!!
@RachelTomasetti
@RachelTomasetti 6 күн бұрын
Simply awesome
@haseebminhas-ai
@haseebminhas-ai 28 күн бұрын
This is a very insightful video I am very curious why you rushed through the "Default Data Loader" which I though was the most important step to defining the "File_ID" mapping.
@ColeMedin
@ColeMedin 28 күн бұрын
Thank you very much! I certainly should have spent more time on the Default Data Loader, that is something I would have done if I were to redo the video!
@cubeddu
@cubeddu 4 ай бұрын
Question: Why don't you make the id in the table documents in supabase be the Google sheet id just change the id to be uuid instead of int8 that way you can remove that step of deleting and inserting the document ... supabase trigger will get called on update too. If you match the IDs this way you can reduce the step and avoid dupes and making sure that when the user is chatting if the document was deleted they fall into that inconsistent behavior as the document might not be there as it got updated and in your current flow you have to delete and insert in between these operations there can be hiccups. btw this is awesome, Most videos about n8n aren't well thought out and you cover a lot. I think this is the best way to get non tech and tech people into RAG! Plus automation, agents all the way.
@gypsypvp
@gypsypvp 4 ай бұрын
having trouble changing the int8 to uuid in supabase, saying "cannot cast type bigint to uuid".. Got a fix?
@ColeMedin
@ColeMedin 4 ай бұрын
This is a FANTASTIC question, I appreciate you asking it! And thank you for the kind words as well! The reason I don't do what you're describing is simply because of a limitation with n8n. When you insert documents into Supabase for RAG with the "Supabase Vectorstore" node, there isn't a way to customize the ID of each record to make it correspond to the Google sheet ID. At least not that I have found. So this approach with the metadata is the way to work around that in n8n. I also really wanted to demonstrate a use case for metadata since it's a really important topic for RAG so it worked out well that this workaround was necessary. If you coded this solution yourself, then what you are proposing would be a very good approach.
@e11e7en
@e11e7en 3 ай бұрын
Perhaps I'm not understanding the suggestions, but with this suggestion, for longer documents which get chunked, wouldn't a single Google document ID be associated with multiple chunks? And wouldn't that be a problems because the Supabase ID needs to be unique for each chunk. Perhaps you could append the Google Doc ID to make it unique (e.g. {googleDocID}-{uniqueNumber}; then you could have access to the Google Doc ID. But this all depends on being able to manage the Supabase ID.
@AadarshRai2
@AadarshRai2 25 күн бұрын
Amazing video
@hannahmaywright
@hannahmaywright 21 күн бұрын
Awesome video! I’m curious if you ever do consulting for businesses. I’m currently working on a startup and I plan on using this technique but I’d love to pay a consultant who actually knows what they’re doing to make sure it’s set up properly from the get go. If you don’t take on new clients I’d also be interested in anyone you might recommend!
@ColeMedin
@ColeMedin 19 күн бұрын
Thank you! I'm not taking on new clients currently, but there are a lot of talented developers in our community over at thinktank.ottomator.ai! Feel free to post there if you want to find someone to help implement this!
@hannahmaywright
@hannahmaywright 16 күн бұрын
@ Based on all your content I really trust your expertise. If you’d be interested, I’d offer you a finders fee for finding someone you trust does good work and knows what they’re doing! If that’s something you’d be interested in let me know and we can exchange contact info so I can send you a bit more detail about my use case.
@AyS-kj4ok
@AyS-kj4ok Ай бұрын
Thank you, very interesting. Question: are we obliged to "Vectorize/Embedd" documents which are below 20 pages? Or can we just use the Text Extractor?
@ramstein74
@ramstein74 4 ай бұрын
Great video. Just subscribed
@ColeMedin
@ColeMedin 4 ай бұрын
Awesome, thank you very much! Glad you enjoyed it :)
@tegarimansyah5470
@tegarimansyah5470 Күн бұрын
Hey Cole, great tutorial and I learned a lot. Just wondering if I want to isolate documents by user (they only can see their own doc), what should I do in the vector table? Something like user id?
@mrrantuan1096
@mrrantuan1096 18 күн бұрын
This tutorial looks amazing! I have modified it to retrieve the documents with FTP, any way of transforming them to txt? Thanks and keep up the great tutorials!!
@ColeMedin
@ColeMedin 18 күн бұрын
Thank you! I will certainly keep it up :) What types of documents are you retrieving? There are a lot of different "extract text" nodes that work with different file types in n8n!
@quercus3290
@quercus3290 3 ай бұрын
your embeddings are everything, if your embeddings are chaotic and of poor quality this will greatly impact outputs.
@ColeMedin
@ColeMedin 3 ай бұрын
Yes very true! I honestly should have focused on the embeddings even more here!
@quercus3290
@quercus3290 3 ай бұрын
@@ColeMedin would make for a good video in of itself, not many people seem to want to explain how embeddings are created, how you can manage them or what the implications they can have for your outputs.
@ColeMedin
@ColeMedin 3 ай бұрын
Yeah definitely - thank you for the suggestion! I have it in my list to create some content around more advanced RAG techniques. Embeddings are necessarily advanced but it does fall under the category of going into something specific to RAG in more detail!
@zindostudios
@zindostudios 21 күн бұрын
Awesome video. New to n8n. Can you share your video where you talk about setting up supabase and postgres. Getting an error here. Thanks!
@ColeMedin
@ColeMedin 19 күн бұрын
Thank you! This is actually my very first video for n8n, other videos I referenced to help with things like that might have been from other channels. What is the error you are getting?
@zindostudios
@zindostudios 19 күн бұрын
@@ColeMedin I think the issue is I set up the Postgres account and tried to link into Supabase and maybe I wasn't supposed to. But there is something between these two preventing it. Error is just some crazy number: connect ENETUNREACH 260.....xxxx. I figured I just needed to rebuild this connection and it would solve the issue.
@ColeMedin
@ColeMedin 18 күн бұрын
No you should be able to hook into Supabase through a Postgres node in n8n! Make sure you are connecting with the "transaction pool" method, the one on port 6543 and not 5432.
@zindostudios
@zindostudios 17 күн бұрын
@@ColeMedin Ahh that might be the issue. Thanks so much. I'll give that a try.
@tidianediallo6199
@tidianediallo6199 Сағат бұрын
Thanks for this great video. I creat a AI agent to the exercices form pdf file by the the response returned by the workflow is not correct, i need your help to achieve this one.
@brilliantexperience
@brilliantexperience 3 ай бұрын
Hi Cole, I got this working with your JSON file in minutes. Thank you for the detailed step-by-step instructions on getting APIs and SQL codes setup! Q: How can I make this just search one or a few documents from the database?
@ColeMedin
@ColeMedin 3 ай бұрын
You are so welcome, nice job!! Could you clarify your question? For RAG it will only retrieve the documents you ingest into the vector DB. You could use metadata filtering to filter down on the documents you want to search. A lot of how that would work would depend on your use case and setup though!
@danielgollner2
@danielgollner2 Ай бұрын
So helpful thank you
@MartinCooney1
@MartinCooney1 4 ай бұрын
great video, subscribed. i'm always looking for interesting n8n tutorials. Pity I'm using Groq at the moment so no idea how to do an Embedding tool with that. Maybe it's in the works
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you Martin! Groq is a fantastic product for LLMs! For embeddings, it is too bad you can't use Groq for that - but you can use Ollama or HuggingFace in n8n if you want to stay open source for the embeddings!
@gabrielzambrano772
@gabrielzambrano772 4 ай бұрын
Bro doing God's work out here
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you Gabriel!! haha
@MattDoman
@MattDoman 3 ай бұрын
🙏🙏🙏🙌🙌🙌
@petril48
@petril48 2 ай бұрын
Thank you, great video Cole! What is the difference between Supabase and Qdrant that you showed in another videos? Is Supabase not on-prem? Thank you,
@ColeMedin
@ColeMedin 2 ай бұрын
Supabase can be run locally like Qdrant! The main reason I have Qdrant in the local AI starter kit (the other video you referenced) is because that's just what was included in the package initially. But I actually do prefer using Supabase with PGVector for RAG! And I might be changing up that package to use Supabase instead of Qdrant and the vanilla Postgres it comes with.
@n8n-io
@n8n-io 4 ай бұрын
Love it!
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you very much!!
@MrAiAgents
@MrAiAgents 4 ай бұрын
Great Content! Can you make a tutorial about how to make agent that can be database manager ? Gives info to client, update record, and more for business?
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you!! And I actually am planning on making a video like this already! Are you thinking this agent would create custom queries to manage the database, or more just call tools that already have queries defined to perform certain actions? I am thinking of doing both but curious what you had in mind!
@PunyapatTangtrisanakul
@PunyapatTangtrisanakul Ай бұрын
Thanks a lot for the video, which is very perfectly useful. I have planned to do a chatbot on Discord, if you have any plan to do some videos explaining how to connect to the Discord bot that would be very helpful. Thanks again and cannot wait for new videos.
@ColeMedin
@ColeMedin Ай бұрын
You bet! Discord is a great platform so yeah I am considering that!
@ZachwithTAG
@ZachwithTAG 2 күн бұрын
so do you have to download postgres if you not using it locally? I wasnt sure after watching if just setting up supabase is enough and the postgres is included in after setting up supabase
@imparpaulo
@imparpaulo 2 ай бұрын
Your tutorials are incredible compared to others. Thank you so much for your amazing work. I have a question regarding the approach to inserting PDF's with tables into vector stores. I am having a lot of trouble and still no good results. I tried your best practices (thank you so much for that) but you don't address this issue, how to insert PDF's with tables without loosing semantics. Would you address this in one of your videos, please? I see there are some solutions with coding but that is a no no for me... and from what I understand it requires pre-preparing the data, is that correct? Can it ne done in n8n? Thank you and keep up the amazing work!!
@ColeMedin
@ColeMedin 2 ай бұрын
Thank you for the kind words! Great question but super hard to answer over text - I am going to be making a video soon though (within the next couple of months) on how to do RAG better with CSVs!
@jorgeferrari2491
@jorgeferrari2491 3 ай бұрын
Greate video, thank you for share. Regarding, vector data base, do you suggest some self hosted solution?
@ColeMedin
@ColeMedin 3 ай бұрын
Thank you, you are welcome! For self hosting a vector DB I'd recommend either Qdrant or self-hosting Supabase and using PGVector.
@bluegreen-ai
@bluegreen-ai 4 ай бұрын
Excellent video. Great job, you have spotted a perfect example and the realization is very well executed.👏 Why do you need to connect the RAG AI Agent for the Postgres chat memory using the Postgres while you use the API connection for the document insertion ? How can I better understand the steps and choices you took for the chunking part ? Could you briefly explain when your method is relevant ?
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you - I appreciate the kind words! The Postgres chat memory is separate from the document insertion (which is for the knowledge retrieval). The chat memory is there so the agent can remember previous messages in the conversation. The document insertion and the Supabase documents table is there for the agent to be able to search across your documents to answer a question. The reason the chat memory and document insertion use different credentials is mostly because the Postgres chat memory in n8n can use any Postgres database - it doesn't have to be Supabase. So those credentials are more "generic" to a Postgres database, while the credentials for RAG are specifically for Supabase. I hope that makes sense! For chunking, a lot of it just comes down to playing around with the chunk and overlap sizes to figure out what works best for your use case! There aren't too many rules to follow there. I just 1000 for my chunk size just because that's a default used in a lot of applications.
@bluegreen-ai
@bluegreen-ai 4 ай бұрын
@@ColeMedin thank you for the precise answers. It seems easy when YOU say it !!
@ColeMedin
@ColeMedin 4 ай бұрын
Haha of course!! Let me know if you have any more questions!
@marcosbeliera1
@marcosbeliera1 3 ай бұрын
You are the man!
@ColeMedin
@ColeMedin 3 ай бұрын
Thank you Marco :D
@kgeereels
@kgeereels 4 күн бұрын
Great video man! Say i have a youtube channel with lots of videos, is it possible to add the youtube channel as a knowledgebase?
@ColeMedin
@ColeMedin 4 күн бұрын
Thank you! Yes that's a great use case and certainly possible with this flow in n8n!
@kgeereels
@kgeereels 3 күн бұрын
@@ColeMedin can you share an idea on how to do it? or how to integrate it with your template?
@ColeMedin
@ColeMedin 2 күн бұрын
I would look into using the KZbin transcript API - you can pull the text for each video one at a time and insert them into the knowledgebase just like I do with files in this example.
@koalahbh
@koalahbh 3 ай бұрын
HI Cole! Thank you very much for the video and the detailed explanation, I was able to implement it here in minutes! But I have a question, and when the file inside the folder is deleted, is this action considered in the "Updated file" node?
@ColeMedin
@ColeMedin 2 ай бұрын
You are so welcome, I'm glad you have it implemented! A deleted file won't trigger the file updated trigger, unfortunately. That's a limitation of N8N I hope they address soon since you have to create a custom webhook using the Google Drive API to actually watch for file deletions.
@vhater2006
@vhater2006 2 ай бұрын
thanks for sharing keep it up 🤓
@nam305
@nam305 13 сағат бұрын
dark mode homie, my eyes are getting blown out
@gadevanggag
@gadevanggag 2 ай бұрын
Hi Cole. Awesome video! Much appreciated. I have built an AI Agent using Langflow (and Astra DB), and I did not take into account the issues you pointed out in this video (specially redundant data with scalability in mind). One question I have: I have some pretty complex documents that includes pictures/graphs/tables and I am looking for a solution that includes the information from those. Is this possible and how complex is it to set up in n8n?
@gadevanggag
@gadevanggag 2 ай бұрын
Hi again. I actually found one of your videos answering my question - thanks pal. Best of luck!
@ColeMedin
@ColeMedin 2 ай бұрын
Fantastic, you bet!!
@ryudswift
@ryudswift 2 ай бұрын
now im interested, which video specifically?
@aDreamTheme
@aDreamTheme 20 күн бұрын
Hi! I'm watching your videos and can't decide which base to choose for RAG: Qdrant or Supabase? For example, if you want to give the model your knowledge base data: PDF, docx, web-site,..., maybe SQL or something in the future. I'm still new to AI, but I liked n8n.
@ColeMedin
@ColeMedin 19 күн бұрын
Both are fantastic and have pros and cons! I generally recommend Supabase because having the same platform for RAG and a SQL database just simplifies your whole tech stack, and Supabase generally performs just as well as Qdrant. Qdrant is faster though, so I would recommend that if speed is super important for your use case!
@aDreamTheme
@aDreamTheme 19 күн бұрын
​@@ColeMedin Thanks for the advice, I'll try it! You have a cool channel and a nice presentation
@ColeMedin
@ColeMedin 18 күн бұрын
Sounds good! Thank you very much!
@aDreamTheme
@aDreamTheme 16 күн бұрын
Hi! Maybe you have an example of loading text into Qdrant vector storage, for example, several megabytes? How to optimize it? Or maybe I missed something in your videos? I initially thought to upload some knowledge base there in several gigabytes of various docx/pdf/html files, is this even possible? Or should I switch to Supabase instead of Qdrant? I need advice from an experienced pro here :-) Everything looked simpler in the video :-) I spent about 15 hours trying to figure out how to make n8n load data into Qdrant. CSV files up to 50 kb are loaded in 1-2 minutes. And if you load 500 kb, everything freezes and an error occurs due to the 32 MB limitation in Qdrant (I couldn't increase it, but it's probably not right either). If you split it into smaller files, say 50 kb, the first one loads fine, but the speed drops significantly with the following files. At the same time, the token splitter seems to split the CSV line by line. For tests, I used this scheme and data www.datacamp.com/tutorial/local-ai
@aDreamTheme
@aDreamTheme 15 күн бұрын
ColeMedin, Thanks again for the ideas from the video. And for the ton of cases on GitHub! After a few more hours of experimenting with n8n, I realized that my problems connected with a feature of CSV processing that was in my test data. They split tokens into chunks separately for each line. And in n8n, it seems like you need to convert CSV into plain text, or process it differently depending on the task. Now, after experimenting with the Qdrant API in Python, I want to make a multi-threaded system so that I can put tasks there in n8n. Because n8n is single-thread originally now.
@DonFinley
@DonFinley 4 ай бұрын
Curious on the google drive node, is there a way to monitor subfolders? The google drive nodes both have this call out, "Changes within subfolders won't trigger this node" In other news, great video and thanks for sharing.
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you Don and great question! That is correct that the Google Drive trigger node doesn't watch subfolders. If you want to monitor subfolders, you could set up triggers for those specific folders as well. Obviously that's only realistic if you don't have dozens of subfolders. The best way to handle this without creating a trigger for each folder would be to use the Google Drive "Changes" API. You can basically tell Google Drive to alert you when a file is created/updated within a folder or your entire Drive by sending a request to a webhook which could be an n8n workflow (with a webhook trigger). This method does handle subfolders! So if you're really curious about extending this I would take a look at the Changes API!
@DonFinley
@DonFinley 4 ай бұрын
​@@ColeMedin Thank you, appreciate the help. I was able to work with the Google Drive search node, triggering the path every 15 minutes and searching for any files that have been modified in the last 15 minutes with this query: modifiedTime > '{{DateTime.now().minus({ minutes: 15 }).toUTC().toFormat("yyyy-MM-dd'T'HH:mm:ss'Z'") }}'
@alvaroaraujo7945
@alvaroaraujo7945 3 ай бұрын
Hey, Cole! Amazing video. I've been working on my version of it. Quick question: I'm doing your workflow, but the original data for vector database is a CSV doc (an employees database)... So, I did a vector database where the batch size is 1:1 (each row became a row), to avoid breaking employees in pieces (lol) However, thus far, the vectors that are showing up in the file retrieval are presenting sub-par quality, where they are related to my query, but not enough. So.. 1) How would you set this up (in matters of parameters like batch size, files number etc.) 2) why is your retrieval files number = 4?. In my case, I've noticed the model is omitting/ignoring important stuff when I leave any value under 24... which is sad in a token expenditure perspective lol Anyways, thanks in advance. good day
@ColeMedin
@ColeMedin 3 ай бұрын
Thank you very much and great questions! So the ideal setup depends a lot here on what kind of queries you want to make. RAG is really good at looking up specific employee records (example: "What is John Doe's salary?") but it is not good at answering questions that would require it to have the entire CSV in its context (example: "What is the average salary of all employees?"). This is because RAG will only have part of the CSV in its context unless you set it up to retrieve the entire document. If the CSV is small enough (rough estimate < 10k characters) you could just not chunk it at all when putting it in the knowledge base. That way it'll pull the entire document to answer questions. Otherwise your idea of one employee per record could work or you could do something like 10 employees per row. My retrieval is 4 because that is pretty standard when your chunk size is something like 1000-2000 characters and you want the RAG solution to lookup very specific information. But this is one of those parameters that you just have to play with a lot! That and the chunk size. The bigger the chunk size, the more information will be available with a smaller retrieval number. So maybe it has to be larger than 24 for you because your individual records are so small (since it's one per employee)?
@alvaroaraujo7945
@alvaroaraujo7945 3 ай бұрын
@@ColeMedin thank you. really complete answer, right here. That makes sense. I’ll test that number higher. My automation has been working good so fine, with 70+ employees
@ColeMedin
@ColeMedin 3 ай бұрын
Glad it makes sense! And that's awesome!!
@leoplaysnotmuch
@leoplaysnotmuch 3 ай бұрын
How did you do this? I am trying to change the chunk to match my row, but I don't know how.
@alvaroaraujo7945
@alvaroaraujo7945 3 ай бұрын
@@leoplaysnotmuch under the document loader you have the “character splitter node”. I’ve set it to as high as my row can get (you can change from characters to tokens). Just make sure your rows aren’t too huge (mine with 1k tokens average are doing well)
@MatteDeiMatte
@MatteDeiMatte 4 күн бұрын
Hey Cole! I have 2 major problems: 1) postgres asks me for Supabase certificate, I've tried any sort of configuration combo but I have errors with wrong host or missing certificate (fyi now Supabase interface is changed from this tutorial), so I've replaced postgres with Window Buffer Memory node. 2) Extract Document Text node doesn't extract the text of my word ord pdf files but random symbols. Nice tutorial btw
@ColeMedin
@ColeMedin 2 күн бұрын
I'm not sure about the Supabase certificate - does n8n give any tips in their docs with this? I haven't seen this issue before. For the extract document text, you'll have to use the specific "extract" node for the file type you are looking to take text out of. For example, there is one specifically for PDFs! Thank you!
@DUB_AI_GUY
@DUB_AI_GUY 3 күн бұрын
Great Content !! However, I have one question : I can write an customize code being an AI Engineer (but it would take in months to create a production ready app). What would you suggest, shall I use n8n or build custom ? (PS : I am working as individual contributor)
@ColeMedin
@ColeMedin 2 күн бұрын
Thank you! If you're comfortable coding I would suggest using an AI IDE like Windsurf/Cursor to help you code fast as long as you are still understanding the code and correcting the LLM when it doesn't output the best code. Otherwise yes n8n is a great option.
@egrud
@egrud Ай бұрын
Great video! Thanks!!! Is it possible to make this product usable as a SaaS for searching for 10-20 different clients, with different databases and different accounts?
@ColeMedin
@ColeMedin 28 күн бұрын
Thank you! You bet! Yes you certainly can - I would do some research on RAG metadata - you can essentially segment the knowledgebase based on the tenant (each of your clients), so when you insert new knowledge you specify the tenant it is for, and then when you query knowledge for a single tenant you use the metadata filtering to limit the knowledge it can pull from to just that tenant.
@AstroB1259
@AstroB1259 4 ай бұрын
This is a great and a detailed tutorial on using n8n for RAG. I noticed that although I add files to the google drive directory the app is monitoring, it still won't fetch those docs for the RAG part. Any idea why this might be happening
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you man, I appreciate it! That's strange n8n isn't picking up on new files in your Google Drive... is your workflow switched to active? You'll have to toggle it to active in the top right of the workflow view to make the Google Drive triggers work! I'd also double check and make sure the triggers are set to use the same folder you are adding files to.
@AstroB1259
@AstroB1259 4 ай бұрын
@@ColeMedin Thank you. It seems like it is not triggering on pdf files, just google doc files, I ended up adding a new text extraction for the pdf but that didn't work either. Maybe you can look into this in the future, unless if I am the only one having this issue. Thanks again for the great content
@ColeMedin
@ColeMedin 4 ай бұрын
Interesting... the file type shouldn't change how well the trigger works! I'll have to look into it and test it out myself. And my pleasure :)
@justosoleno5009
@justosoleno5009 4 ай бұрын
Hey Cole, I have a question regrading the aplication of this to a multi-tenant database where each tenat should have its own rag for its docuemnts. Is this posible? BTW great video!
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you very much! And great question! It is hard to get into this in great detail in a KZbin comment, but you can easily do multi-tenant RAG using metadata filters within a vector DB. With metadata filtering you don't even need a separate index per tenant, though you can do that too. So basically the tenant ID (or company/customer ID, whatever you call it) will be a part of all requests into these workflows. Any inserts into the vector DB will have the tenant ID included in the metadata. Then any retrievals from the vector DB for this tenant can simply filter on the tenant ID in the metadata to guarantee that it is only retrieving information for that tenant. Let me know if this makes sense!
@vinniet3627
@vinniet3627 13 күн бұрын
Thanks dude
@ColeMedin
@ColeMedin 13 күн бұрын
You bet man!
@josemadarieta3
@josemadarieta3 4 ай бұрын
well done. subscribed
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you very much!!
@Oliv-i2h
@Oliv-i2h 4 ай бұрын
Thanks for the video ! I believe your workflow has a problem, but you did not run into because your document is split in only one chunk. Indeed, if the doc is split in multiple chunks, the delete node runs multiple times and the download node runs multiple times as well (and so will the rest of the workflow, leading to duplicates in the DB). Checking the option "Execute once" is not an option if we want to maintain the capacity to handle multiple files at once. Would be happy to have a workaround that 😁
@ColeMedin
@ColeMedin 4 ай бұрын
My pleasure, and thanks for raising this! I think you might be right, but I'll have to test it! Regardless, the workflow triggers per document that is created/updated even if they are created within the same polling minute (there would just be multiple executions at once) so you actually should be able to check the "Execute once" option.
@Oliv-i2h
@Oliv-i2h 4 ай бұрын
@@ColeMedin Thank you for your quick feedback ! You're making a good point. In my case though, I want to maintain the possibility to deal with multiple docs at once (as I want to trigger manually not auto). I will keep investigating around that 😀
@ColeMedin
@ColeMedin 4 ай бұрын
Ah okay that makes sense! I believe there is a way in n8n to merge multiple output items into one. That way you can take all the records that are outputted from the Supabase delete node and combine them so you aren't running the rest of the workflow multiple times.
@alphaleakswithavb
@alphaleakswithavb 3 ай бұрын
Great tutorial! Ironically, I've been stuck for a couple of days on the google drive authentication. Not able to connect n8n with google for some reason :/
@ColeMedin
@ColeMedin 3 ай бұрын
Thank you! I'm sorry you're having issues with the Google Drive authentication? What is the specific error message you are getting?
@alphaleakswithavb
@alphaleakswithavb 3 ай бұрын
@@ColeMedin I believe the error was with the app being on Testing mode, it didn't allow any OAuth to proceed (contact developer - kinda funny when you are the 'developer' haha). I was able to troubleshoot by adding the email manually to google console, I guess whitelisting it for Oauth login while is Testing. I tried switching the app to Live mode but it required google review and approval, etc.
@franchutee5675
@franchutee5675 3 ай бұрын
For some reason, the agent prioritizes the memory and does not use the documents with the tool. When I remove the memory, it uses the documents tool perfectly. I don’t understand the logic behind this. This is the system message: You are a personal assistant responsible for answering questions using a corpus of documents. Before stating that you do not know the answer, you must use the 'documents' tool to search for relevant information in the vector store. This search should be your primary action every time you receive a question, unless it is absolutely clear that there is no useful information available. Always respond in Spanish. This version emphasizes the necessity of using the specified tools to ensure thorough document searches.
@ColeMedin
@ColeMedin 3 ай бұрын
Interesting... I didn't run into this issue myself for this setup but I have had this happen with RAG agents before. This is especially common with models that aren't as powerful, so the easiest thing to try is to use a more powerful model if you can. Like try GPT-4o instead of GPT-4o-mini if you're using that. Also I'm curious - what kind of conversation did you have with the agent where the memory and knowledge base would have conflicting information? Is it because you added a document to the knowledge base half way through the conversation? Sometimes you have to restart the conversation when there is new information in the knowledge base, because the LLM doesn't necessarily understand that new info is available which is why it can resort to what it said earlier in the conversation.
@lucasazevedo7053
@lucasazevedo7053 2 ай бұрын
i struggle with the exact same problem, have you found a solution for this? I'm using mistral-large-latest model. When i clean memory, it call the tool just fine, but the second question it doesn't call the tool
@moses5407
@moses5407 4 ай бұрын
GREAT tutorial. How can this be modified to work with pdf's?
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you!! I haven't tested this with PDFs specifically myself but others have and this should work already for PDF documents! Otherwise, there is a specific "Extract from PDF" node in n8n you could use. So you could add a condition to the n8n workflow that routes to the regular text extractor when the file is not a PDF file, and route to "Extract from PDF" when it is.
@moses5407
@moses5407 4 ай бұрын
@@ColeMedin Thanks for your reply and, again, for the great tutorial. I'm going to get this installed today or tomorrow and will try pdf's and let you know.
@ColeMedin
@ColeMedin 4 ай бұрын
@@moses5407 Of course and that sounds great!
@NishanthA32
@NishanthA32 4 ай бұрын
For anyone else wondering about this, here's how I was able to implement it: I set up an IF node after the download a file node with this condition {{ $binary.data.fileExtension }} = pdf - If True, it'd go into the extract pdf text node followed by a Set node, that takes the extracted value and saves it to data. It connects to the "insert into supabase" node. - If False, it'd flow normally, into the extract document text node
@annasc8280
@annasc8280 4 ай бұрын
Great! Thanks a lot!!!
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you! My pleasure 😀
@breakoutgaffe4027
@breakoutgaffe4027 2 ай бұрын
Great video! Realistically though, is this going to work as a chat bot for web app with (potentially) thousands of users?
@ColeMedin
@ColeMedin 2 ай бұрын
Thanks! Yes but you'll have to have a large instance to handle the load to N8N!
@tomthompson1198
@tomthompson1198 2 ай бұрын
i want somethign locally ran and or hosted. look forward to that.
@pjones6749
@pjones6749 23 күн бұрын
Hey Cole, great work! But do you know why the LangChain vector stuff (SQLEditor code) isn't installing properly on Supabase self-hosting? I entered the code and ran, and it seemed to work but no table was created. Thanks
@ColeMedin
@ColeMedin 23 күн бұрын
Thank you! That's a bummer - you aren't seeing any error message at all? My guess is you're looking at the incorrect database schema. Supabase typically uses the "public" schema but maybe it's looking in a different place by default in the self hosted Supabase?
@sohail789
@sohail789 4 ай бұрын
Please create a video that we use all open source and setup locally
@ColeMedin
@ColeMedin 4 ай бұрын
I do actually have a video out already where I have a similar setup that is fully local! kzbin.info/www/bejne/jJCTlYF7Yq1lndk
@iotgen278
@iotgen278 4 ай бұрын
Thanks for the great video. can Qdrant or Chroma be used locally instead of hosted Supabase?
@ColeMedin
@ColeMedin 4 ай бұрын
Thank you!! And n8n doesn't support using local vector DBs, although you can use a hosted Qdrant vector DB with n8n! If you wanted to use a local vector DB in the workflow, you could host it on the same machine that your n8n is self hosted on and then create a custom code step to work with the local vector DB.
@PeterFalk-g7u
@PeterFalk-g7u 2 ай бұрын
Great video! Question for you - if you were completely removing a file from your google drive, what node (and how would you set it up) would you use to update the vector database to reflect the files removal? Thanks in advance!
@ColeMedin
@ColeMedin 2 ай бұрын
Thanks! And good question - unfortunately n8n doesn't have a trigger node from when files are deleted in Google Drive, so you would have to set up a custom webhook trigger following the Google Drive API to watch for file deletions.
@PeterFalk-g7u
@PeterFalk-g7u 2 ай бұрын
@@ColeMedin Appreciate the response! Thanks Cole.
@ColeMedin
@ColeMedin 2 ай бұрын
You bet Peter!
@amineamaach4450
@amineamaach4450 4 ай бұрын
Hey Cole, you forgot to mention that pgvector extension needs to be enabled to work with embedding vectors in Supabase. Thanks,
@ColeMedin
@ColeMedin 4 ай бұрын
Thanks for pointing that out! PGVector is actually enabled as a part of the SQL script that I show how to run within the Supabase platform. But I certainly could have called that out more clearly!
@henriquematias1986
@henriquematias1986 Ай бұрын
My main question here is, for instance, let’s say i have a bunch of PDFs that needs to be RAGed. How can i add them manually to that database instead of using n8n. And if a PDF gets updated, how do i replace it ( i guess i would have to remove from database and re add ? )
@ColeMedin
@ColeMedin Ай бұрын
Since you have to vectorize the PDFs, there isn't a super good way to do it manually that I know of. You could have AI help you create a script to parse through your PDFs though and add them for RAG! To your last question - yes, remove from the DB and readd!
@AadarshRai2
@AadarshRai2 25 күн бұрын
What we need is a knowledge evaluator agents before RAG agents imo.
@regisaabh
@regisaabh 3 ай бұрын
Hi Cole, do you know if it is possible to output a summary of the chat interaction? I wonder, for example, if I could add another AI assistant in this workflow to do that at the end of the chat iteration, but I don't know how to do that without screwing up the current workflow.
@regisaabh
@regisaabh 3 ай бұрын
Probably would be better if I simple extract the chat history and sent it out of the workflow and then create another one to do that. Just don't know how to extract it and send it out. Any idea?
@ColeMedin
@ColeMedin 3 ай бұрын
Great question! So the chat memory is stored in the Supabase database so you can extract all the messages out based on the current session ID!
@chip902
@chip902 3 ай бұрын
How would you recurse through a single Google Drive directory? I'm doing a nightly sync with my local Obsidian vault and I'd love my AI Agent to get really smart on my years of notes
@ColeMedin
@ColeMedin 3 ай бұрын
Great question! You can create a separate n8n workflow to scrape through an entire Google Drive directory pretty easily! I might be making a video on that in the future, but essentially in n8n you can set up a workflow to list all files in a directory and then in a loop go through each one and add it to the knowledgebase similar to how I do it in the video!
@namanpatel985
@namanpatel985 3 ай бұрын
Why supabase? what is benefit of supabase vs postgres? In this video not using any advance auth mechanism to validate user and I believe same can still be done with Postgres, right?
@ColeMedin
@ColeMedin 3 ай бұрын
Supabase is running Postgres under the hood! It's just super convenient compared to hosting Postgres yourself and it has features like authentication and row level security for expanding this solution.
@PressaDigital-Cortes
@PressaDigital-Cortes 3 ай бұрын
I think RAG AI is really good with a small volume of data, like a 10-page PDF. However, when moving to something more serious, like over 50 pages and about 20 tables in a file, it doesn't respond as well. I'm referring to a file with more than 2,000 lines
@ColeMedin
@ColeMedin 3 ай бұрын
Yes you certainly aren't wrong! There are a lot of factors that determine how well a RAG system performs, like the embedding model, the LLM model to handle retrieved chunks, your chunk size, how you split up your documents (especially for things like tabular data), your use of metadata filters, etc. A lot of advanced RAG techniques can be used too like reranking, hybrid search, knowledge graphs, etc. All of this becomes a lot more important once you have a lot of files or very large files like you are saying!
@Future_me_66525
@Future_me_66525 2 ай бұрын
Interested in advanced RAG retrieval
@ColeMedin
@ColeMedin 2 ай бұрын
Yeah more content coming soon for advanced RAG topics!
@pablovvick
@pablovvick 4 ай бұрын
Thank you for the video. What wasn’t clear to me, and I would like to know before starting with this tutorial, is whether any of the documents I would upload are analyzed in the cloud or if everything is processed locally, including the database or even when the AI responds. Is everything done locally? I’d like to apply it at work, but there are certain privacy requirements that demand everything to be on-premise.
@ColeMedin
@ColeMedin 4 ай бұрын
My pleasure and I appreciate your concern! This is not running entirely locally. The LLM I use is GPT, and I use the cloud (managed) version of Supabase. However, you could easily make this entirely local if you want! You could run the LLM yourself with Ollama (something like Llama 3.2 11b/90b) and then host Supabase yourself for the DB. And then n8n is self-hosted in this video so that is already local. I have a video on my channel where I show a similar setup that is entirely local! kzbin.info/www/bejne/jJCTlYF7Yq1lndk
@pablovvick
@pablovvick 4 ай бұрын
@@ColeMedin Thank you so much!
@ColeMedin
@ColeMedin 4 ай бұрын
Of course!
@HenrykAutomation
@HenrykAutomation 4 ай бұрын
Hey mate, nice vid! I was waiting for something that will show me how to use n8n for my use cases. Do you think Supabase is better than Qdrant? From your video it seems you like it because you can keep track of the conversation history without needing something extra like MongoDB?
@ColeMedin
@ColeMedin 4 ай бұрын
Thanks Henry! Yes, that is one of the big reasons I picked Supabase over Pinecone or Qdrant. It's nice to not have to have one platform for the conversation history and another for RAG! On top of that, Supabase makes it really easy to look at my knowledgebase in a tabular view which I can't do with non pgvector implementations.
@HenrykAutomation
@HenrykAutomation 4 ай бұрын
@@ColeMedin Yeah noticed that view as well. Super cool. Do you have the possibility to see the vectors within each document upload? I think the dream would be to have a solution, where you could just have everything within on platform. That would be money for sure.
@ColeMedin
@ColeMedin 4 ай бұрын
@@HenrykAutomation Yes you can see the vectors for each document chunk in the Supabase table as well! I agree that's the dream, and it seems like Supabase is the right direction.
@julesflechet
@julesflechet Ай бұрын
thank you so much for the value!! Just a question : why the file ID doesn't appear in my vector database in the column 'metadata' like you ?
@BrantGarveyNoXcuses
@BrantGarveyNoXcuses 15 күн бұрын
Thanks for the video Cole! it was great, but I am getting this error using Supabase for the chat history "Cannot use a pool after calling end on the pool" any idea why that would be the case? Also they have changed the layout of there database setting since this video, just as an FYI.
@ColeMedin
@ColeMedin 15 күн бұрын
You bet! You know someone else was getting this error recently too (I haven't seen it myself), so I'm wondering if it's something new with n8n. Make sure you are using the "transaction pooler" connection string from Supabase. The one where the port is 6543 and not 5432.
Run ALL Your AI Locally in Minutes (LLMs, RAG, and more)
20:19
Cole Medin
Рет қаралды 382 М.
The Future of RAG is Agentic - Learn this Strategy NOW
45:49
Cole Medin
Рет қаралды 56 М.
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
No Code RAG Agents? You HAVE to Check out n8n + LangChain
17:46
Cole Medin
Рет қаралды 25 М.
The #1 RAG System That Actually Works, Period!
24:06
Quentin Daems | Make Automation
Рет қаралды 6 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 235 М.
Turn ANY Website into LLM Knowledge in SECONDS
18:44
Cole Medin
Рет қаралды 168 М.
How to Build Effective AI Agents (without the hype)
24:27
Dave Ebbelaar
Рет қаралды 180 М.
Build anything with DeepSeek R1, here’s how
21:36
David Ondrej
Рет қаралды 521 М.
Build Everything with AI Agents: Here's How
39:58
David Ondrej
Рет қаралды 540 М.
Step-By-Step: Add 100+ Files to Pinecone for RAG AI Agent with n8n
14:41
Nate Herk | AI Automation
Рет қаралды 13 М.