Kütüphane / RAG ve Bilgi Bankaları
RAG ve Bilgi Bankaları
Notion'dan Ollama gömmeleriyle Supabase vektör bilgi tabanı oluştur
Notion sayfalarını okumak, yerel bir Ollama modeliyle gömmeler oluşturmak ve bunları geri çağırma için bir Supabase pgvector tablosuna kaydetmek üzere elle çalıştırın.
Ne yapar
## Prerequisites ### 1. Notion: create an integration - Go to https://www.notion.so/my-integrations - Click "New integration" and give it a name - Copy the Internal Integration Token (you will need it in Step 4) - In your Notion database, click Share → Invite your integration ### 2. Supabase: enable pgvector and create the table In your Supabase project, open the SQL Editor from the left sidebar and run: sql create extension if not exists vector; create table documents ( id bigserial primary key, content text, metadata jsonb, embedding vector(768) ); create or replace function match_documents ( query_embedding vector(768), match_count int default 5, filter jsonb default '{}' ) returns table ( id bigint, content text, metadata jsonb, similarity float ) language plpgsql as $$ begin return query select documents.id, documents.content, documents.metadata, 1 - (documents.embedding query_embedding) as similarity from documents where documents.metadata @> filter order by documents.embedding query_embedding limit match_count; end; $$; ### 3. Ollama: running locally - Install Ollama: https://ollama.com - Pull the embedding model: ollama pull nomic-embed-text - Make sure Ollama is running before executing this workflow ### 4. Add credentials in n8n In n8n, go to Settings → Credentials → Add Credential and create: Notion API (type: Notion API): - Internal Integration Token → paste the token copied in Step 1 Supabase (type: Supabase): - Host URL → Supabase Dashboard → Settings → API → Project URL - Service Role Secret → same page, under "Project API keys" → service_role Ollama (type: Ollama): - Base URL → http://localhost:11434 ### 5. Connect credentials to nodes Open each node that shows a credential warning and select the matching credential from the dropdown. ### 6. Configure the Remove Existing Embeddings node Open the Remove Existing Embeddings node and replace YOUR_SUPABASE_PROJECT_URL with your Supabase project URL (found in Supabase Dashboard → Settings → API → Project URL). Select your Supabase credential from the dropdown. This node runs at the start of every execution and clears all documents from the knowledge base before re-inserting fresh content, so re-running the workflow never creates duplicates.
Adımlar
- Start Notion Ingestion
- Get Notion Pages
- Fetch Page Blocks
- Aggregate Block Text
- Insert into Knowledge Store
- Generate Embeddings Ollama
- Load Default Data
- Split Text for Processing
- Schedule Sync
- Skip Empty Pages
- Remove Existing Embeddings
Benzer otomasyonlar
RAG ve Bilgi BankalarıAutonomous AI Customer Support Agent with Multi-KB RAG & Human Escalation50 adımRAG ve Bilgi BankalarıBuild a Google Drive document similarity database with Ollama and Postgres56 adımRAG ve Bilgi BankalarıGitHub dokümantasyonunu Ollama gömmeleriyle Qdrant vektörlerine günlük senkronize edin14 adımRAG ve Bilgi BankalarıChat with local documents using Ollama and MariaDB Vector cache28 adım