İçeriğe geç
YENİAlaaddin ile tanış: sesi olan yapay zekâ cinin. trig8n 1 Ocak 2027'de yayında. Yeniliklere bak

Kütüphane / RAG ve Bilgi Bankaları

RAG ve Bilgi Bankaları

Yüklenen dosyaları Google Drive'a arşivleyin ve Pinecone'da indeksleyin

Dosyaları webhook ile alır, Google Drive'a arşivler ve RAG aramaları için OpenAI ile parçalara ayırıp gömerek Pinecone'a yazar; parça boyutunu dosya türüne ve boyutuna göre ayarlar.

Ne yapar

# Upload Files to a Pinecone Knowledge Base Send a file to a webhook and it gets archived in Google Drive and indexed into Pinecone, ready to be searched by a RAG chatbot. Chunk size, overlap, and embedding batch size are all calculated automatically from the file's size and type, so small text files and large PDFs are each handled sensibly without manual tuning. ### How it works 1. A webhook receives the uploaded file as binary data. 2. A Code node reads the file size and extension, then works out the best chunk size, chunk overlap, and embedding batch size. PDFs get smaller chunks, plain text gets larger ones, and everything stays inside safe limits. 3. The file is uploaded to a Google Drive folder so the original stays available for source links later. 4. The file is downloaded back from Drive and passed to the Pinecone node. 5. A data loader splits the file page by page and tags every chunk with its source filename, the text splitter applies the calculated chunk settings, and OpenAI embeddings are stored in your Pinecone index. 6. The webhook responds once indexing finishes. ### Setup 1. Add your API keys to the credential placeholders: OpenAI, Pinecone, and your Google Drive account. 2. Replace YOUR_PINECONE_INDEX_NAME with your Pinecone index, and YOUR_GOOGLE_DRIVE_FOLDER_ID with the folder that should hold the originals. 3. Activate the workflow and POST a file to the webhook URL as multipart form data. ### Customization - Edit the size thresholds in the Code node to change how aggressively files are chunked. - Add extra metadata fields in the data loader to filter searches later.

Adımlar

  1. 1. Webhook - Receive File Upload
  2. 6. Respond - Confirm Upload
  3. 5. Pinecone - Store Document Chunks
  4. Embeddings - OpenAI
  5. Text Splitter - Dynamic Chunk Size
  6. Data Loader - Split Pages and Tag Source
  7. 2. Code - Calculate Chunk and Batch Size
  8. 3. Google Drive - Upload File
  9. 4. Google Drive - Download File

Benzer otomasyonlar