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

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

说明与用途

使用 Apify PDF Citation Chunker 从 PDF 创建可引用的 RAG,生成带有页面信息和稳定 ID 的分块。

问题

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