Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Citation-ready RAG from PDFs: page-aware chunks with stable IDs in ~30 lines of Python

Описание и применение

Создание RAG с точными ссылками на страницы PDF с помощью Apify PDF Citation Chunker, обеспечивающего стабильные идентификаторы и метаданные.

Задача

RAG systems need to reference exact source pages and avoid duplicate vectors when PDFs are updated.

Результат

Processed 48-page NIST PDF into 55 chunks with page-aware metadata and stable IDs, costing $0.012 at $0.00025 per page.

Рабочий процесс

  • 1. Set up Apify account and API token. 2. Install required Python packages. 3. Call the PDF Citation Chunker actor with URL, chunkSize, and overlap. 4. Retrieve the SUMMARY record to confirm success and metrics. 5. Inspect individual chunk records for page, chunkId, and hashes.

Доказательства

Most RAG tutorials start with PdfReader(...).pages and a text splitter. That works until the agent has to say where an answer came from, or you re-ingest an updated PDF and end up with duplicate vectors.

Источник

It downloads a public PDF, extracts embedded text page by page, and returns chunks that already carry: the source page, document title, stable chunkId, SHA-256 of the chunk text and of the original PDF bytes, an approximate token count.

Источник

Cost: the listing charges $0.00025 per PDF page that produces usable chunks (FREE tier, as listed on 2026-10-25; check the Pricing tab). At that price, the 48-page document below works out to 48 × $0.00025 = $0.012.

Источник

  • Дата записи: 2026-10-25T23:26:28.001Z