VectifyAI/PageIndex
📑 PageIndex: Document Index for Vectorless, Reasoning-based RAG
PageIndex – Vector‑less, reasoning‑based Retrieval‑Augmented Generation
What it is – PageIndex is an open‑source RAG engine that replaces the usual vector‑store + chunking pipeline with a hierarchical tree index built from a document’s layout. At query time an LLM walks the tree, using its own reasoning (and the full conversation context) to locate the most relevant sections. The result is a retrieval step that is traceable, explainable, and context‑aware without any vector database.
Key ideas
| Concept | How PageIndex does it |
|---|---|
| Indexing | Parses a PDF (or other text‑heavy document) into a tree that mirrors the document’s logical structure (chapters, sections, headings). A lightweight LLM model (index=) summarizes each node; the tree itself is derived from the layout, not from embeddings. |
| Retrieval | When a question is asked, the chat model (chat=) reasons over the tree, selecting nodes step‑by‑step much like a human reader. The model sees the full conversation history, domain knowledge, and any external context, so relevance is driven by reasoning rather than pure similarity. |
| No vectors / no chunking | Because the index is a deterministic tree, there is no need for a vector DB, similarity search, or fixed‑size chunks. |
| Explainability | The path the model follows through the tree is visible, giving a clear citation (page‑level locally, line‑level in the cloud). |
Quick‑start (local mode)
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", # cheap model for building the tree
chat="gpt-5.6-sol", # model that does the reasoning search
)
# Upload a PDF and get a document identifier
doc_id = client.submit_document("report.pdf")['doc_id']
# Ask a question – the client walks the tree for you
answer = client.chat("What was the 2023 operating margin?", doc_id=doc_id)
print(answer)
The same SDK works against PageIndex Cloud by setting index="cloud" and providing a PAGEINDEX_API_KEY.
Main features
- Tree‑based index that mirrors the document’s logical hierarchy.
- LLM‑driven search: the model decides which node to explore next, allowing multi‑step reasoning.
- Local and Cloud modes – run the whole pipeline on‑premises or let PageIndex’s managed service handle OCR, image understanding, and massive corpora (File System layer).
- Cost‑effective: indexing costs ≈ $0.001 / page; query cost stays flat regardless of document length because only the visited nodes are sent to the model.
- Traceable citations – every answer can be linked back to the exact page (local) or line (cloud).
- Plug‑and‑play SDK with streaming, multi‑document search, and ready‑made tools for OpenAI/Claude agent frameworks.
Benchmarks & performance (as reported in the README)
- Indexing – $0.001 / page, 13 s → 4.5 min for PDFs ranging from 9 to 1,098 pages.
- Query cost – 2.1× cheaper than feeding the whole PDF to a model at 52 pages, 16.6× cheaper at 420 pages; beyond ~800 pages the full‑PDF approach exceeds context windows.
- Accuracy – on the FinanceBench QA benchmark PageIndex achieved 98.7 % accuracy, far above the ~50 % typical of vector‑based RAG.
- OSS benchmark – the companion
PageIndex-OSS-Benchmarkrepo evaluates 62 lookup questions over 34 PDFs (1,945 pages) and shows a clear trade‑off curve between model size and per‑query cost.
Typical use cases
- Financial reports, regulatory filings, legal contracts – where relevance depends on domain knowledge and multi‑step reasoning.
- Technical manuals & medical literature – long, structured documents where precise citations are required.
- Enterprise knowledge bases – especially when you need explainable retrieval without managing a vector DB.
Licensing & contribution
The repository is open‑source (the README does not list a specific license, so check the LICENSE file in the repo). Contributions are welcomed via pull requests; the project also offers a commercial Cloud service for OCR, image understanding, and large‑scale indexing.
Where to learn more
- Website / docs – https://pageindex.ai
- SDK docs – https://docs.pageindex.ai
- Blog & benchmark details – https://pageindex.ai/blog
- GitHub benchmark repo – https://github.com/VectifyAI/PageIndex-OSS-Benchmark
PageIndex lets you retrieve information from massive, complex PDFs the way a human would read them—without the overhead of vectors or opaque similarity scores.
Related
- Project
- Project
- Project
- Project
- Project