n8n RAG Chatbot
Workflow-Powered RAG with n8n + pgvector + OpenAI
Documents (0)
Upload .txt files to build your knowledge base
Welcome to n8n RAG Chatbot!
Upload documents and ask questions about them.
Powered by n8n workflows
Knowledge Base
Upload documents to build your custom knowledge base
Smart Search
Vector similarity search finds relevant context
AI Responses
GPT-4o generates answers based on your data
Tech Stack & Architecture
n8n Workflows
- •Document Ingestion - Webhook-triggered text processing
- •Query Processing - Vector search + GPT-4o response
- •OpenAI Integration - text-embedding-3-small (1536 dims)
- •PostgreSQL + pgvector - Vector storage with HNSW indexing
Frontend
- •Next.js 15 - React framework with App Router
- •Tailwind CSS - Glassmorphism styling
- •Direct Webhook Calls - No backend API needed
- •Session Privacy - localStorage-based isolation
n8n Workflow Data Flow
Document Ingestion Workflow:
Webhook Trigger
→Validate Input
→Create Document
→Chunk Text
→OpenAI Embeddings
→Store in Postgres
Query Workflow:
Webhook Trigger
→Embed Question
→pgvector Search
→Format Context
→GPT-4o Response
→JSON Response
Key Technical Features
✓No Backend Code: n8n handles all processing
✓Semantic Chunking: 500 tokens with 50-token overlap
✓Visual Workflow: Easy to modify and extend
✓Source Citations: Track which documents answered questions