PageIndex: what it is and how tree-based RAG works
Learn how PageIndex uses a document tree for RAG without a vector database, what its benchmarks measure, and when it is worth testing.
Imagine a 200-page annual report and a simple question: "Why did the margin fall?" The answer may sit in a note that never uses the word "margin." Meanwhile, "operating margin" may appear in several passages that explain nothing.
This is a familiar problem with similarity search: the passage most similar to a question is not always the one that answers it. PageIndex starts from that distinction. Instead of looking for nearby vectors, it builds a document outline and lets a model decide which pages to open.
The approach is called vectorless RAG. The name gets attention, but a more useful question is this: if vector search goes away, where does its work go?
What PageIndex indexes
In a typical vector RAG pipeline, a document is split into chunks and turned into embeddings. The question also becomes a vector, and the system retrieves the nearest passages.
In PageIndex, the unit is a tree node, much like an entry in a table of contents. Each node holds a title, an identifier, start and end pages, a summary, and any child nodes. Here is a shortened example from the documentation, based on a Federal Reserve report:
1{2 "title": "Financial Stability",3 "node_id": "0006",4 "start_index": 21,5 "end_index": 22,6 "summary": "The Federal Reserve ...",7 "nodes": [8 {9 "title": "Monitoring Financial Vulnerabilities",10 "node_id": "0007",11 "start_index": 22,12 "end_index": 28,13 "summary": "The Federal Reserve's monitoring ..."14 }15 ]16}The index does not answer the question. It gives the model a map for choosing where to read.
How the tree is built
In the current local version, the structure comes from the PDF itself. The PageIndex Flash module uses layout statistics and embedded bookmarks to build the hierarchy without an LLM. A model then writes summaries and helps refine the tree.
This has two consequences:
- Indexing gets lighter. The project reports about $0.001 per page with the model used in its test, without embeddings.
- Layout quality matters. If a PDF reveals no hierarchy, each page becomes a node. According to the Flash documentation, when that happens in a file of more than 10 pages, the local client refuses the document. Local mode also requires text-based PDFs; scanned files are left to the cloud service.
So "no chunking" does not mean no splitting. The document is still divided, but by sections and pages rather than token windows.
How the agent finds an answer
At query time, an agent receives tools to list documents, inspect metadata, open a structure, and read pages. A typical path would be:
- List documents and choose the report.
- Open the tree, with only titles, pages, and summaries.
- Choose a node that seems likely to contain the answer.
- Read the pages in that range.
- Decide whether the evidence is enough. If not, return to the tree.
- Answer and, when enabled, cite the page.
Content is read in parts. It resembles how a person consults a technical book: contents, chapter, page, and sometimes a detour to the appendix.
The documented basic usage is short. The code below was not run for this article:
1from pageindex import PageIndexClient23client = PageIndexClient(4 index="gpt-6-luna", # summarizes and refines the tree5 chat="gpt-6.2-sol", # navigates and answers6)7doc_id = client.submit_document("report.pdf")["doc_id"]89answer = client.chat(10 "What changed in the risk factors?",11 doc_id=doc_id,12 citations=True,13)Traceable is not the same as correct
Page citations make answers easier to check, and the agent's path can be inspected. That is a real debugging advantage: you can tell whether an error came from choosing a section or from reading it.
But a citation only shows where the model says a claim came from. It can still open the wrong section, stop before finding every item, or misread the right page. Vector RAG can also preserve source pages and passages; that depends on the pipeline.
Local and cloud are not the same
The package is MIT-licensed, but some capabilities exist only in PageIndex Cloud:
- Documents. Local: text-based PDFs. Cloud: text-based, scanned, and image-rich PDFs.
- Index. Local: on your machine. Cloud: stored by the service.
- Citation. Local: page. Cloud: page and highlighted area.
- Folders, collections, and MCP server. Local: no. Cloud: yes.
The local tools' code shows another detail: documents are listed by date, with a name and description, in pages of up to 50. Semantic relevance ranking is not yet available locally. That may be enough for a few reports. With thousands of files, finding which document to open becomes another search problem.
"Local" also does not mean nothing leaves the machine. When the model is accessed through an API, summaries, structure, and the pages it reads are sent to that provider. The same care with sensitive data in LLM applications still applies.
What the numbers actually measure
The project publishes data and scripts, so its results can be examined. However, the vendor produced all three sets below, and none used version 0.7.4, the latest on PyPI when this was checked.
Comparison with vector search. A notebook using version 0.4.1 asked 63 questions about five NVIDIA annual reports:
- PageIndex: 100.0% accuracy, $110 per 1,000 queries.
- Vector, top-k 10: 54.0% accuracy, $16 per 1,000 queries.
- Vector, top-k 30: 74.6% accuracy, $42 per 1,000 queries.
- Vector, top-k 50: 79.4% accuracy, $68 per 1,000 queries.
- Vector, top-k 100: 87.3% accuracy, $135 per 1,000 queries.
The notebook itself describes this as a hard retrieval case: documents from one company with the same template and different numbers. The baseline uses 512-token chunks, and the notebook describes neither hybrid search nor reranking. The result suggests navigation helps in this case. It does not show that it beats every vector pipeline.
The model's influence. The Financial QA Benchmark kept the questions and library fixed while changing the agent's model. Claude Haiku 5.5 at medium effort scored 68.3%, at $6.46 per hundred questions. Claude Opus 5.5 at maximum effort reached 98.7%, at $128.49. Hy4 reached 99.0% at $10.73. The test has no vector baseline, but it shows how retrieval now depends on the chosen model.
The 98.7% on FinanceBench. This number belongs to Mafin 2.5, a financial system built on PageIndex. In the published results, the 150 answers were labeled as follows:
- 136 aligned with the reference;
- 6 as benchmark errors;
- 5 as different valid approaches;
- 1 as the same evidence with another valid conclusion;
- 2 as not aligned.
The 98.7% corresponds to 148 out of 150, accepting the 12 answers reclassified by human evaluation. Counting only aligned answers would give 90.7%. The review may be legitimate, since benchmarks contain errors. Still, the number needs that explanation and should not be read as the local package's performance on any document.
In these materials, I found no per-query latency measurement comparing the local agent with vector search. The Thoughtworks Technology Radar placed the tool in Assess in April 2026 and warned that using an LLM for retrieval can add significant latency and cost. In a three-query DataCamp tutorial, PageIndex failed on a cross-reference: it chose the parent section rather than the box containing the answer. It is a small test, but a reminder that navigation fails too.
When I would test it, and when I would stay with vectors
I would test PageIndex when:
- documents are long and have well-defined sections;
- questions depend on context, references, or several sections;
- there are few candidate documents per question;
- checking the page matters more than answering in milliseconds.
I would start with vector, text, or hybrid search when:
- there are many short or heterogeneous documents;
- query volume is high and latency is tight;
- questions are direct;
- files have little hierarchy.
The two can also be combined: conventional search selects documents, and the tree guides reading within them.
A small experiment before deciding
- Choose 5 to 10 documents that are safe to use.
- Write 30 to 50 questions with expected answers and pages.
- Include direct, multi-section, cross-reference, and unanswerable questions.
- Compare the current pipeline, a hybrid baseline with reranking, and PageIndex.
- Record correct answers, correct pages, correct refusals, p50 and p95 latency, calls, and total cost.
- Repeat the runs, because the agent may choose different paths.
This follows the logic of evals for AI features. Without a well-tuned baseline, the test measures the alternative's weakness more than the new tool's strength.
Limits of this analysis
This article examines documentation, code, and results published up to November 23, 2026, at commit add6b17. It is not an independent benchmark. The package is classified as Alpha and has changed considerably in a few months, so check models, prices, and limits before using it.
Conclusion
PageIndex does not eliminate retrieval. It changes who performs it: a cheap mathematical comparison gives way to a model that reads a map and makes decisions.
For long, well-structured documents, that trade may pay off. The price is greater dependence on the model, a higher cost per decision, and more steps before an answer. I would not start by asking whether vectors are over. I would check whether, in my documents, the right answer lives in the right section or merely in the most similar passage.