Library / RAG & Knowledge Bases
RAG & Knowledge Bases
Two-Stage Document Retrieval Chatbot with OpenAI and Supabase
When a chat message arrives, this finds relevant files by similarity in Supabase, then retrieves their content for OpenAI to answer from.
What it does
### Files table create table public.files ( id uuid not null default gen_random_uuid (), name text null, category text null, date_created timestamp with time zone null default (now() AT TIME ZONE 'utc'::text), google_drive_url text null, theme text null, description text null, embedding extensions.vector null, google_drive_id text null, status text null default 'ready'::text, type public.file_type null, video_transcription_url text null, constraint files_pkey primary key (id) ) TABLESPACE pg_default;
The steps
- Database retrieval1
- When chat message received
- OpenAI
- GetFile
- UpdateEmbedding
- OpenAI CreateEmbeddings
- When clicking ‘Execute workflow’
- Find Files
- Filter similarity
- Aggregate files
- Set Output
Similar automations
RAG & Knowledge BasesDocument Chatbot with RAG, OpenAI, Supabase and Cohere Reranker13 stepsRAG & Knowledge BasesAnswer Drive Document Questions with OpenAI and Supabase16 stepsMCP Servers & ToolsOpenIndex Retrieval Plugin API as an MCP Server2 stepsRAG & Knowledge BasesTelegram Document Assistant with Gemini and Supabase25 steps