Библиотека / RAG и базы знаний
RAG и базы знаний
Конвертация PDF и офисных файлов в Markdown для RAG с Apify и OpenAI
Запускается из формы, в которой пользователи отправляют ссылки на документы, преобразует их в Markdown-фрагменты с учётом заголовков и номеров страниц через Apify и сохраняет для ответов OpenAI с цитатами.
Что делает
## Chat with your PDF and Office files, with page citations Who's it for: teams and solo builders who want answers from their own documents (contracts, manuals, reports, slide decks, spreadsheets, scans) with the file and page each answer comes from. How it works 1. Add documents is a form: paste links to PDF, DOCX, PPTX, XLSX, HTML, EPUB or image files. 2. Convert to Markdown runs the Apify Actor *Document to Markdown*. It keeps headings and tables (also borderless PDF tables), reads scanned pages with OCR, and returns heading-aware chunks with page numbers. 3. Store chunks embeds each chunk with OpenAI and saves it in a vector store, with file, title, page and heading as metadata. 4. Chat with your documents opens a chat. The AI agent searches the store, answers only from what it finds and cites (title, p. N). How to set up 1. Create a free Apify account and copy your API token (Apify Console → Settings → API & Integrations). 2. In Convert to Markdown, create a *Header Auth* credential: name Authorization, value Bearer YOUR_APIFY_TOKEN. 3. Add your OpenAI credential to the two embeddings nodes and the chat model. 4. Click Execute workflow to open the form, paste a few file links and submit. When the run finishes, click Open chat and ask a question. Requirements: Apify account ($2 per 1,000 pages, $5 per 1,000 OCR pages) and an OpenAI API key (embeddings cost a few cents per 1,000 pages). How to customize - The Simple Vector Store lives in n8n's memory and is cleared on restart. For production, swap both vector store nodes for Pinecone, Qdrant, Supabase or Postgres (PGVector) with the same embeddings. - Feed files from Google Drive, Dropbox or S3 with a pre-signed link instead of the form. - Change the chunk size in Configure. Keep chunk size plus overlap under 1,000 characters, or the loader splits the chunks again.
Шаги
- Add documents
- Configure
- Convert to Markdown
- One item per chunk
- Store chunks
- Embeddings for storing
- Chunk text and metadata
- Chat with your documents
- AI agent
- OpenAI chat model
- Conversation memory
- Search documents
- Embeddings for search
Похожие автоматизации
Веб-скрейпинг и исследованияКонвертация веб-страниц в чистый Markdown через API TopAI Web-to-MarkdownШагов: 2Написание и генерация контентаСоздание пошаговых руководств в Markdown по видео YouTube с помощью Apify и OpenAIШагов: 9Поддержка клиентов и служба помощиОтветы на вопросы поддержки в Telegram с Gemini и SupabaseШагов: 13Чат-боты и боты для мессенджеровИИ-агент по продажам для Bitrix24 с Gemini и SupabaseШагов: 54