← Back to archive

Repo of the Day

GitHub - VectifyAI/PageIndex: 📑 PageIndex: Document Index for Vectorless, Reasoning-based RAG

Published: Jul 15, 2026

Open repository ↗

📑 PageIndex: Document Index for Vectorless, Reasoning-based RAG - VectifyAI/PageIndex

Summary

PageIndex is an open-source Python SDK for "vectorless" RAG that builds a hierarchical tree index from a PDF and lets an LLM reason through it the way a human reader would, instead of relying on vector similarity search. It targets long, complex documents such as financial reports, legal filings, and technical manuals where topical similarity alone often misses the answer.

What it is useful for

PageIndex fits cases where you need to query long, structured PDFs and the right answer depends on context rather than phrasing. Where vector RAG returns opaque "similar" chunks, PageIndex returns a path through the document's section tree, so you can cite the specific part of the file an answer came from. The README reports 98.7% accuracy on FinanceBench versus roughly 50% for vector RAG, and argues that handing a whole PDF to a model is not a substitute: at 805 pages the document exceeds the context window, and on smaller documents the README says native PDF input costs 2.1x to 16.6x more per query. The main documented limitation is that local mode only handles text-based PDFs; scanned or image-rich documents, OCR, image understanding, and managed storage are restricted to the cloud tier.

How engineers can use it

The README's quickstart installs the SDK, submits a PDF, and asks a question:

pip install -U pageindex
import os
from pageindex import PageIndexClient

os.environ["OPENAI_API_KEY"] = "your-openai-key"

client = PageIndexClient(
    index="gpt-5.6-luna",   # model that builds the tree index
    chat="gpt-5.6-sol",     # model that searches the tree
)
doc_id = client.submit_document("report.pdf")["doc_id"]
print(client.chat("What was the 2023 operating margin?", doc_id=doc_id))

The README states that indexing runs roughly $0.001 per page and takes about 13 seconds to 4.5 minutes for documents between 9 and 1,098 pages, after which the tree is reused for every subsequent question. To offload parsing and storage, set index="cloud" and supply a PageIndex API key. The SDK is also documented to plug into the OpenAI Agents SDK, the Claude Agent SDK, and an MCP server on the cloud tier. Streaming, multi-document search, citations, and folder organization are described in the linked documentation, which is where to look for full configuration details.