A CLI and web workbench that compiles raw documents into an interlinked, LLM-maintained markdown wiki, using PageIndex tree retrieval for long files.
VectifyAI/PageIndex
A vectorless RAG engine that builds a hierarchical tree index of long documents and lets an LLM reason through it to retrieve answers.
- Stars
- 40,134
- Forks
- 3,454
- Open issues
- 151
- Last commit
- 21 hours ago
What is it?
PageIndex is a retrieval framework for long, complex documents such as financial reports, legal filings, technical manuals and textbooks. Instead of splitting text into chunks and storing embeddings in a vector database, it generates a hierarchical tree index for each document and has an LLM search that tree to find the relevant sections, much as a human reader would navigate a table of contents.
The project offers a Python SDK (pip install pageindex) with a local mode that builds and stores indexes on your machine using your own LLM API key, and a cloud mode where indexing, OCR, image understanding and storage are handled by PageIndex Cloud. Local mode targets text-based PDFs, while cloud mode also handles scanned and image-rich documents. Answers include references back to the source, at page level locally and block level in the cloud.
The README reports benchmark results on FinanceBench and a cost comparison against passing whole PDFs to a model, but these are the authors' own measurements.
Key features
- 01Builds a tree-structure index per document without a vector database or chunking.
- 02Retrieves by LLM reasoning over the tree rather than semantic similarity.
- 03Local mode runs on your machine with your own LLM API key.
- 04Cloud mode adds OCR, image understanding and managed storage.
- 05Answers include traceable references to source pages or blocks.
Use cases
- Question answering over long financial reports or regulatory filings.
- Querying legal contracts or technical manuals where exact section references matter.
- Building RAG over textbooks or academic papers without managing a vector store.
Quick start
- 1
Install the PageIndex package
pip install -U pageindex - 2
Set your OpenAI API key and build a tree index from a PDF, then ask a question
Things to know
- Needs an LLM API key (such as OpenAI) or a Claude subscription for indexing and chat.
- Local mode is aimed at text-based PDFs; scanned or image-rich documents need the paid Cloud service.
- Query accuracy and cost depend on the chat model you choose.
In collections
Topics
FAQ
- What is PageIndex?
- A vectorless RAG engine that builds a hierarchical tree index of long documents and lets an LLM reason through it to retrieve answers. PageIndex is a retrieval framework for long, complex documents such as financial reports, legal filings, technical manuals and textbooks. Instead of splitting text into chunks and storing embeddings in a vector database, it generates a hierarchical tree index for each document and has an LLM search that tree to find the relevant sections, much as a human reader would navigate a table of contents.
- Is PageIndex free to use? What license does it have?
- PageIndex is open source under the MIT license. Check the license terms before using it in commercial products.
- Is PageIndex still maintained?
- Actively maintained. The last commit to PageIndex was on Nov 6, 2026.
- What can I use PageIndex for?
- Question answering over long financial reports or regulatory filings. Querying legal contracts or technical manuals where exact section references matter. Building RAG over textbooks or academic papers without managing a vector store.
- How do I install PageIndex?
- Install the PageIndex package: pip install -U pageindex Set your OpenAI API key and build a tree index from a PDF, then ask a question
- Where can I get PageIndex?
- The source code and installation instructions are on GitHub: https://github.com/VectifyAI/PageIndex
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Air-gapped, open-source desktop app: a NotebookLM-style AI agent that researches, transforms and edits your local documents.
Self-hosted platform for building AI agents and assistants that answer questions from your own documents, with citations and any model.
A Python implementation of Tree of Thoughts, which lets LLMs solve problems by searching over candidate reasoning steps instead of answering in one pass.
A PyTorch-style Python library for building LLM workflows such as chatbots, RAG, and agents, with automatic prompt optimization.
Local, evidence-first memory runtime for AI agents that filters writes, tracks fact changes over time, and explains each recalled result.