Image
NewPageIndex Flash — fast, open-source tree indexing for long, text-based PDFs

Vectorless, Reasoning-based RAG
for long, complex documents

Retrieval that's accurate, traceable, and context-aware.
No vector DB, no embeddings, no chunking.

How PageIndex works
Sourcereport.pdf — a 120-page annual report
report.pdf120 pagesBusiness Overviewp. 1-24Financial Resultsp. 25-78Risk Factorsp. 79-120Revenue and Cost of Salesp. 26-40Operating Margin Analysisp. 41-52
A 120-page PDF arrives — headings, sections, page numbers, and nothing a machine can navigate.
Operating margin was 18.4% in 2023. <cite doc="report.pdf" page="43"/>

Get Started in Seconds

0

Install the SDK

$pip install -U pageindex
1

Get a PageIndex API key

Create one in the Developer Dashboard.

2

Index a document

Submit a PDF, and PageIndex builds a tree index that preserves the document's structure.

3

Ask a question

Your LLM agentically reasons over the tree to retrieve relevant information and form answers.

View Documentation
import osfrom pageindex import PageIndexClient os.environ["PAGEINDEX_API_KEY"] = "your-pageindex-key"os.environ["OPENAI_API_KEY"] = "your-openai-api-key" client = PageIndexClient(    index="cloud",       # index and store in PageIndex Cloud    chat="gpt-5.6-sol",  # your own LLM answers) doc_id = client.submit_document("report.pdf", wait=True)["doc_id"] query = "What benchmarks are used?" for chunk in client.chat(query, doc_id=doc_id, stream=True):    print(chunk, end="", flush=True) 

Proven on Benchmarks

Try it on your documents

FinanceBench is the industry-standard QA benchmark over SEC filings, and the questions need the right pages out of long, dense reports.

On it, PageIndex reaches 98.7% retrieval accuracy — still the highest to date.

Retrieval accuracyFinanceBench
RAG with Vector DB50%
RAG with PageIndex98.7%
Benchmark details

Run It Local or on Cloud

PageIndex Local

Open source, on your own machine, with your own model key.

client = PageIndexClient(    index="gpt-5.6-luna",  # PageIndex Flash, running locally)
  • Documents and tree indexes never leave your disk
  • PageIndex Flash indexes a 1,000-page PDF in minutes, for about a dollar
  • Built for text-based PDFs — reads the layout directly, no OCR
  • Fully open source, 35k+ stars on GitHub
View on GitHub

PageIndex Cloud

Fully managed indexing, storage, and retrieval. Nothing to run.

client = PageIndexClient(    index="cloud",  # index and store in PageIndex Cloud)
  • OCR and image understanding for scanned and image-heavy files
  • Hosted document storage and retrieval API, scaling handled for you
  • API keys, usage, and indexed documents in one dashboard
  • Free tier to start — 30k+ developers already building on it
Start on Cloud

PageIndex vs Vector DB

PageIndex

Logical Reasoning

PageIndex reasoning-based document retrieval diagram
High Retrieval Accuracy

Relies on logical reasoning to determine relevance rather than similarity, ideal for domain-specific data.

Context-Aware Retrieval

Retrieval depends on full context (e.g., conversational history and domain or enterprise knowledge), enabling holistic retrieval with seamless integration of new context.

Traceable & Explainable Retrieval

Explainable and traceable reasoning process, with each retrieved result containing exact page or section references.

No Time-to-First-Token Delay

Retrieval happens during generation time, allowing responses to stream immediately without waiting for a separate retrieval phase.

Lightweight Infra

Requires only a lightweight tree index (JSON) that integrates with mainstream databases. No extra infra needed.

Best for Domain-Specific Document Analysis

Financial reports and SEC filings

Regulatory and compliance documents

Healthcare and medical reports

Legal contracts and case law

Technical manuals and scientific documentation

Vector DB

Semantic Similarity

Vector DB
Low Retrieval Accuracy

Relies on semantic similarity, unreliable for domain-specific data where similarity does not imply relevance.

Context-Independent Retrieval

Embedding models lack the capacity to effectively incorporate chat context or specialized knowledge into retrieval, requiring fine-tuning to adapt to new context.

Black-box Retrieval without Traceability

Often lacks clear traceability to source documents, difficult to verify information or understand retrieval decisions.

Time-to-First-Token Delay

Retrieval is separate from generation, requiring users to wait for the entire retrieval phase to complete before the response begins streaming.

Extra Infra Overhead

Requires a separate embedding pipeline, vector database, and additional infra, with sync and maintenance overhead.

Best for Generic & Exploratory Applications

Vibe retrieval

Semantic recommendation systems

Creative writing and ideation tools

Short news/email retrieval

Generic knowledge question answering

Start building with PageIndex

Higher Accuracy

01

Higher Accuracy

Relevance beyond similarity

Traceable & Explainable

02

Traceable & Explainable

Reasoning-driven retrieval with references

No Chunking

03

No Chunking

Preserves document structure

No Vector DB

04

No Vector DB

No extra infra overhead

No Top-K

05

No Top-K

Retrieves all relevant passages

Context-aware Retrieval

06

Context-aware Retrieval

Retrieval depends on full context

Human-like Retrieval

07

Human-like Retrieval

Mirrors how humans read