πŸ“– Local chatbot with retrieval augmented generation (RAG)

⚑ 110,801 views Β· πŸ“– Internal Wiki & Knowledge Base

Description

Build a 100% local RAG with n8n, Ollama and Qdrant. This agent uses a semantic database (Qdrant) to answer questions about PDF files.

Tutorial

thumbnail.png Click here to view the YouTube Tutorial

How it works

Build a chatbot that answers based on documents you provide it (Retrieval Augmented Generation). You can upload as many PDF files as you want to the Qdrant database. The chatbot will use its retrieval tool to fetch the chunks and use them to answer questions.

Installation

  1. Install n8n + Ollama + Qdrant using the Self-hosted AI starter kit
  2. Make sure to install Llama 3.2 and mxbai-embed-large as embeddings model.

How to use it

  1. First run the β€œData Ingestion” part and upload as many PDF files as you want
  2. Run the Chatbot and start asking questions about the documents you uploaded

πŸ”— Nodes Used

AI Agent, Ollama Chat Model, Simple Memory, Recursive Character Text Splitter, n8n Form Trigger, Default Data Loader

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup