Templates / Answer questions from documents with RAG using Supabase, OpenAI & Cohere reranker

Answer questions from documents with RAG using Supabase, OpenAI & Cohere reranker

Ready for 3.0

by Luan Correia ✓ · 1,672 views · created 2025-07-23 · Internal Wiki, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (11)

Google DriveDefault Data LoaderOpenRouter Chat ModelReranker CohereSupabase Vector StoreEmbeddings OpenAIAI Agent

What it does

This workflow contains community nodes that are only compatible with the self-hosted version of n8n. This comprehensive RAG workflow enables your AI agents to answer user questions with contextual knowledge pulled from your own documents — using metadata-rich embeddings stored in Supabase. 🔧 Key Features: RAG Agents powered by GPT-4.5 or GPT-3.5 via OpenRouter or OpenAI. Supabase Vector Store to store and retrieve document embeddings. Cohere Reranker to improve response relevance and quality. Metadata Agent to enrich vectorized data before ingestion. PDF Extraction Flow to automatically parse and upload documents with metadata. ✅ Setup Steps: Connect your Supabase Vector Store. Use OpenAI Embeddings (e.g. text-embedding-3-small). Add API keys for OpenAI and/or OpenRouter. Connect a reranker like Cohere. Process documents with metadata before embedding. Start chatting — your AI agent now returns context-rich answers from your own knowledge base! Perfect for building AI assistants that can reason, search and answer based on internal company data, academic papers, support docs, or personal notes.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.