πŸ“– Local document question answering with Ollama AI, Agentic RAG & PGVector

⚑ 7,039 views Β· πŸ“– Internal Wiki & Knowledge Base

Description

πŸš€ n8n Local AI Agentic RAG Template

Author: Jadai kongolo

What is this?

This template provides an entirely local implementation of an Agentic RAG (Retrieval Augmented Generation) system in n8n that can be extended easily for your specific use case and knowledge base. Unlike standard RAG which only performs simple lookups, this agent can reason about your knowledge base, self-improve retrieval, and dynamically switch between different tools based on the specific question.

Why Agentic RAG?

Standard RAG has significant limitations:

What makes this template powerful:

Getting Started

  1. Run the table creation nodes first to set up your database tables in Supabase
  2. Upload your documents to the folder on your computer that is mounted to /data/shared in the n8n container. This folder by default is the β€œshared” folder in the local AI package.
  3. The agent will process them automatically (chunking text, storing tabular data in Supabase)
  4. Start asking questions that leverage the agent’s multiple reasoning approaches

Customization

This template provides a solid foundation that you can extend by:


The non-local (β€œcloud”) version of this Agentic RAG agent can be found here.

πŸ”— Nodes Used

Postgres, Webhook, Local File Trigger, AI Agent, OpenAI Chat Model, Recursive Character Text Splitter

πŸ“₯ Import

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

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