Leadership
Chatbot | Personal Agentic Contextual RAG Chatbot
A personal AI chatbot using OpenAI, Supabase, and Postgres to answer questions by using RAG on text and tabular data from a knowledge base, complete with chat memory.
Built · ~7 hours saved per week
Personal Agentic Contextual RAG Chatbot
Workflow Overview This workflow creates a sophisticated, conversational AI assistant capable of answering questions from a knowledge base of documents. It functions as a backend for a chatbot interface, receiving user queries via a Webhook and returning AI-generated answers.
The system is designed to handle both unstructured text documents (like PDFs, DOCX) and structured tabular data (CSVs, Excel files). It intelligently decides the best method to find an answer, making it a powerful and versatile data analysis tool.
- Technologies Used: - n8n: The automation platform coordinating the entire process. - Webhook: To receive user messages from a chat frontend. - OpenAI: Provides the core intelligence (LLM for reasoning) and text embedding capabilities. - Postgres: Acts as the primary database for storing document metadata, raw data from tabular files, and conversation history. - Supabase Vector Store: A specialized Postgres implementation used for efficient similarity searches on text data (the core of RAG). - LangChain: The underlying framework for the n8n AI nodes, enabling agentic behavior, memory, and tool usage.
- Automation Value: This workflow automates the process of querying and synthesizing information from a diverse set of documents. Instead of manually searching through files or writing complex SQL queries, a user can simply ask questions in natural language. The AI agent handles the complexity of finding the relevant document, retrieving the right information using either semantic search or SQL, and formulating a coherent answer.
AI Integration This workflow is a prime example of an AI Agent. The AI is not just generating text; it is an active participant that makes decisions and uses a suite of tools to accomplish its goal.
The RAG AI Agent node is the brain of the operation. It receives the user's question and, based on a detailed system prompt, devises a plan. It has access to multiple tools and autonomously decides which one is best suited for the task:
1.
Tags: Chatbot, Leadership Automations, PMS Automations, Webhook Trigger, Reports & Analytics, RAG
Integrations: OpenAI, Supabase, Postgres, AI Agent, Webhook