What is PageIndex? RAG without vector database: tree-based indexing for long documents

November 20, 2026

Updated:

Guide
What is PageIndex? RAG without vector database: tree-based indexing for long documents

PageIndex là gì?

PageIndex là một công cụ RAG mã nguồn mở của Vectify AI, thay cơ sở dữ liệu vector bằng chỉ mục dạng cây (giống mục lục) cho từng tài liệu, rồi để mô hình ngôn ngữ lớn suy luận đi theo cây đó tới đúng phần cần đọc, như một chuyên gia lật mục lục một báo cáo dài. Theo GitHub API (đọc ngày 04/11/2026), kho VectifyAI/PageIndex có khoảng 40.000 sao, 3.440 fork, giấy phép MIT, tạo ngày 01/04/2025 và push gần nhất ngày 03/11/2026; gói Python pageindex trên PyPI đang ở bản 0.5.1. Chế độ chạy cục bộ miễn phí, còn PageIndex Cloud tính phí theo trang (0,01 USD mỗi trang lập chỉ mục, theo trang giá đọc ngày 04/11/2026). Bài này giải thích PageIndex khác RAG vector ở đâu, chi phí thật, cách cài, giới hạn và khi nào nên dùng.

Sơ đồ PageIndex: tài liệu PDF dài được dựng thành cây mục lục gồm chương, mục và trang; câu hỏi đi vào LLM, LLM suy luận chọn nhánh trên cây, đọc đúng các trang liên quan rồi trả lời kèm trích dẫn trang; chạy cục bộ với khoá API của bạn hoặc trên PageIndex Cloud
PageIndex dựng cây mục lục cho tài liệu, rồi để LLM chọn nhánh thay vì so độ giống vector. Sơ đồ: OPCAIOS.

PageIndex là gì và ai tạo ra?

PageIndex là "động cơ RAG không vector, dựa trên suy luận" do công ty Vectify AI phát triển, nhóm tác giả Mingtian Zhang, Yu Tang và đội PageIndex. Dự án gồm thư viện mã nguồn mở trên GitHub, dịch vụ PageIndex Cloud, ứng dụng chat tài liệu và Page Search API.

RAG (Retrieval-Augmented Generation) là cách cho mô hình ngôn ngữ đọc tài liệu của bạn trước khi trả lời; nếu chưa quen, xem RAG là gì?. Cách phổ biến là cắt tài liệu thành đoạn nhỏ, biến mỗi đoạn thành vector, rồi tìm đoạn "giống" câu hỏi nhất. README của PageIndex (GitHub, đọc ngày 04/11/2026) lập luận rằng giống chưa chắc đã liên quan: với báo cáo tài chính, hồ sơ pháp lý hay sổ tay kỹ thuật, đoạn trả lời đúng thường không dùng cùng từ với câu hỏi. PageIndex đi theo hai bước. Đầu tiên, nó dựng một cây phân cấp cho mỗi tài liệu: chương, mục, tiểu mục, kèm tóm tắt và số trang. Tiếp theo, khi có câu hỏi, một mô hình ngôn ngữ lớn đọc cây, suy luận nhánh nào chứa câu trả lời, mở các trang đó ra đọc, rồi trả lời kèm trích dẫn. Dự án nói ý tưởng lấy cảm hứng từ AlphaGo. Kết quả là không cần cơ sở dữ liệu vector và không cần cắt đoạn, đổi lại mỗi lần tìm phải gọi mô hình suy luận.

PageIndex có những tính năng chính nào?

PageIndex có chỉ mục dạng cây, truy xuất bằng suy luận của mô hình, trích dẫn tới trang, chạy cục bộ hoặc trên đám mây, và tích hợp với các bộ công cụ agent. Bản Cloud thêm OCR, hiểu hình ảnh, thư mục, siêu dữ liệu và máy chủ MCP.

Tính năng Mô tả ngắn (theo README và tài liệu, đọc ngày 04/11/2026)
Chỉ mục dạng cây Cấu trúc lấy từ bố cục tài liệu; mô hình chỉ tóm tắt và tinh chỉnh
Truy xuất bằng suy luận LLM đi theo cây thay cho tìm kiếm độ giống vector
Trích dẫn Cục bộ: tới mức trang; Cloud: tới mức khối nội dung
PageIndex Flash Dựng cây nhanh cho PDF dạng chữ, mặc định ở chế độ cục bộ
SDK hai chế độ Một client cho cục bộ (khoá API của bạn) và Cloud
Dùng gói Claude Gọi mô hình Claude qua Claude Code bằng gói đăng ký, không cần API key
Tích hợp agent Công cụ cho OpenAI Agents SDK, Claude Agent SDK và framework khác
Chỉ có trên Cloud OCR, tài liệu quét và nhiều ảnh, thư mục, siêu dữ liệu, máy chủ MCP

Is PageIndex free, and what about Cloud pricing?

PageIndex runs locally for free and is open source; you only pay the language model provider. PageIndex Cloud charges per page with no monthly minimum, according to docs.pageindex.ai as read on 04/11/2026.

Item Price (read 04/11/2026; before tax, subject to change)
Local mode Free, MIT license
Cloud: indexing 0.01 USD per page, one-time
Cloud: active pages 0.001 USD per page per month, first 1,000 pages free
Cloud: retrieval No retrieval charge, model cost paid directly to provider
Trial credit 10 USD, no card required
Private deployment (VPC, on-premises) Contact, price not announced

Hidden costs lie in the model. The README says building a local tree costs around 0.001 USD per page with a basic OpenAI model, meaning a 1,000-page course costs over a dollar (per the project, unverified). The bigger money is usually in question-answering: the README recommends using the best model you can afford for the tree search step, and each question is one or more model calls. Example from the pricing page: 3,000 pages on Cloud costs 30 USD to index and 2 USD per month to keep ready.

How do I install PageIndex and get started?

Installing PageIndex requires Python 3.10 or later (per PyPI, read 04/11/2026) and an API key from a model provider, such as OpenAI. You install the package with pip, create a client with two models—one to build the tree and one to ask questions—then submit PDF documents.

  1. First, install the package:
pip install -U pageindex
  1. Next, set the environment variable for your model provider's API key (the README uses OPENAI_API_KEY).
  2. Create a PageIndexClient with an index parameter (the tree-building model, a basic model is enough) and a chat parameter (the tree search model).
  3. Submit documents with submit_document, receive a doc_id, then ask questions with chat.
  4. Finally, if you have a Claude subscription package, the README explains how to install the version with Claude integration:
pip install -U "pageindex[claude]"

To use Cloud, get your PageIndex API key from developer.pageindex.ai and set the index parameter to cloud. We have not tested these steps ourselves; we took them from the README.

What are PageIndex's limits and risks?

PageIndex works well with long, well-structured documents, but the local mode only handles text-based PDFs well, no OCR. Each question costs a model call, so it is slower and more expensive than vector search when the question count is high. Document data goes through your chosen model provider.

The first limit is format. According to the comparison table in the README (read 04/11/2026), the local version is for text-based PDFs only; scanned documents, photos of invoices, or reports with many charts need Cloud. Next is cost and latency: vector search costs almost nothing per call, but PageIndex has the model reason over the tree, so a system answering thousands of questions a day must calculate model costs carefully. Third is scope: PageIndex is designed for one long document; to search across millions of documents in a warehouse, the project recommends PageIndex File System, but that is a Cloud-only feature. Fourth is numbers: the 98.7% accuracy on the FinanceBench evaluation set and the claim to "reduce 97% of token costs" from Page Search API come from the project, unverified independently. Last is personal data: in local mode, page content is still sent to your model provider; in Cloud mode, documents are stored on Vectify AI servers. With contracts, personnel files, or customer data, read the data policy of each party. Using the Claude package through Claude Code also means checking Anthropic's terms for your subscription plan. We have not compared the original text of these terms; this is not legal advice.

PageIndex versus RAG vector and other options

PageIndex differs from RAG vector in how it searches: reasoning across a tree instead of similarity matching. It does not completely replace RAG vector; each approach suits a different data type. Feeding the entire PDF to the model is a third option, simple but increasingly expensive as length grows.

Criteria PageIndex RAG vector (chunking and embedding) Feeding entire PDF to model
Index Table of contents tree per document Vector of each chunk None
Search method Model reasons to select branch Semantic similarity Model reads all
Citation To page or block To chunk, often hard to trace back Depends on model
Suits Structured long reports, records, handbooks Many short documents, high-volume Q&A Short documents, few questions
Infrastructure No vector database needed Requires vector database Not needed

General description, not measurements. The README states that feeding entire PDF costs 2.1x more on a 52-page document and 16.6x more on a 420-page document compared to PageIndex (per project announcement, not verified). If you are building a document chatbot with a no-code tool, see What is Dify? and RAG AI chatbot with Dify and Supabase.

When to use PageIndex?

PageIndex suits when the answer lies deep in a long document, you need page citations to verify, and you accept paying the model per question. For short document repositories, high-volume Q&A, or people who cannot write Python, consider other approaches.

Situation Recommendation
Q&A on long financial reports, contracts, technical standards Very suitable, exactly the project's target
Scanned documents, many images Need PageIndex Cloud
Customer support chatbot with thousands of short questions daily Consider RAG vector, cheaper per query
Programming agent needing to read long documents Suitable, has tools for Claude Agent SDK and MCP server on Cloud
Do not know Python Use PageIndex chat app or no-code RAG tool

Example (hypothetical): an accounting service person uploads a client's 300-page annual report, asks "what was last year's operating profit margin", gets an answer with page number, then opens that exact page to verify before sending to the client.

Experience from OPCAIOS

We added PageIndex to the Repo list under Utilities on opcaios.org after reading the README and checking that the repository is still maintained; we have not tested it ourselves, so this section states the criteria we use to evaluate, not an assessment after use.

  1. Is the repository still updated: yes, pushed on 03/11/2026 and PyPI version 0.5.1 released the same day.
  2. License: MIT for open-source code; Cloud is a separate paid service.
  3. Hidden costs: no GPU needed, but each document and each question costs model money; set a spending limit before testing with large documents.
  4. Can it replace what we use now: worth trying only when RAG vector gives wrong answers on long structured documents; with short notes, the old way still works.

Read more: What is LLM?, What is MCP?, What is Claude Code?, 5 best memory tools for AI agents 2026.

Frequently Asked Questions

Does PageIndex completely replace vector databases?

Not exactly. PageIndex forgoes vector databases for question-answering tasks on individual long, structured documents, like financial reports or legal files, because reasoning over the table of contents tree finds the right answer better than similarity scores. For repositories with many short documents, or systems answering thousands of questions a day, vector search is still cheaper and faster per query. Many systems can use both: vector to select documents, PageIndex to search within selected documents.

Is PageIndex running locally completely free?

The software is free, and Vectify AI does not charge for local mode, according to the FAQ on the pricing page read on 04/11/2026. But PageIndex needs a language model to build the tree and search within it, so you still pay OpenAI or another provider via API keys. The README estimates building a tree costs around 0.001 USD per page with the basic model (as the project claims, unverified); question-answering costs extra depending on the model. People with a Claude subscription can use it via Claude Code.

Can PageIndex read Vietnamese documents?

The README does not specifically mention Vietnamese. Local mode takes the tree structure from the layout of text-based PDFs, while summarization and reasoning are handled by the language model you choose, so quality with Vietnamese mainly depends on that model and the cleanliness of the PDF. Scanned or photographed documents need OCR, which is only available in Cloud mode. We have not tried it with Vietnamese documents, so test it on a few sample documents before building a full system.

Is the 98.7% figure on FinanceBench trustworthy?

The 98.7% accuracy figure on FinanceBench, a set of questions about financial documents, comes from Vectify AI's blog post and their evaluation repository and has not been independently verified in this article. The project does publish data and instructions to re-run on GitHub, which is a good point. Results on English financial reports do not guarantee similar results with your documents. The most trustworthy way is to ask yourself 20 to 30 questions with known answers from your real documents and compare.

Can someone without coding knowledge use PageIndex?

The open-source library requires writing a few lines of Python and managing API keys, so non-coders will find it hard to set up on their own. Easier options are PageIndex's document chat application on the web, or ask a coding agent like Claude Code to write sample code following the README and read it carefully before running. Whichever way you choose, do not upload sensitive documents before reading the data policy. To learn how to bring AI into your work with real documents, see OPCAIOS's AI application training course.

Source: GitHub VectifyAI/PageIndex (README, API, read on 04/11/2026: around 40,000 stars, 3,440 forks, MIT), PyPI pageindex 0.5.1, pricing page docs.pageindex.ai/pricing and pageindex.ai (read on 04/11/2026); not read/not verified: FinanceBench blog post, benchmark repository, PageIndex Cloud data policy, Claude subscription terms via Claude Code; star count and pricing may change. Experience is from OPCAIOS.

Translated from Vietnamese with AI. Read the original.

Want to apply this in your business?

Book a free 30-minute call (Vietnam time, in English or Vietnamese).

Book a call