开源项目 GitHub Trending 2026-09-29T12:01 正文 ok 1083 words

PageIndex:无向量、基于推理的 RAG 文档索引

英文标题:🔥 VectifyAI/PageIndex

VectifyAI 推出 PageIndex,以层级树索引替代向量数据库和文本分块,让 LLM 像人类阅读长文档一样沿文档结构进行推理式检索。其 SDK 已支持本地模式与 PageIndex Cloud:本地可使用自有 LLM API key 建索引、检索和对话,云端则提供 OCR、图像理解、托管存储等能力。官方称,本地索引使用 `gpt-5.6-luna` 时成本约为每页 0.001 美元,9 至 1,098 页文档的索引耗时约 13 秒至 4.5 分钟。PageIndex 还宣称在 FinanceBench 上达到 98.7% 准确率,并在部分文档中较直接向模型输入完整 PDF 显著降低单次查询成本。
打开原文相关 5 · 机会 3
media197.8 KB media5.1 KB media355.3 KB media146.5 KB media141.5 KB media137.0 KB media131.9 KB media143.5 KB media139.8 KB media126.6 KB media123.3 KB media82.3 KB media79.8 KB media653.2 KB media110.8 KB media56.1 KB

中文

pi_github_banner_low

PageIndex:无向量、基于推理的 RAG

基于推理的 RAG ◦ 无向量数据库、无分块 ◦ 感知上下文的检索 ◦ 像人一样阅读

  • [2026 年 8 月] 🔥 PageIndex SDK:pip install -U pageindex 现已提供本地模式:可完全在本机上使用自己的 LLM key 建立索引、检索和对话;也可通过 API key 使用同一客户端连接 PageIndex Cloud。
  • [2026 年 8 月] ⚡ PageIndex Flash:面向文本型 PDF 的快速树索引生成方案,现已成为 PageIndex SDK 本地模式的默认索引方法。
  • 将 PageIndex 扩展至数百万份文档:PageIndex File System 是文件级树索引层,使 PageIndex 能够对整个语料库而非单一文档进行推理。
  • PageIndex App:面向专业长文档、具备类人分析能力的文档分析 Agent。

你是否对向量数据库在长篇、复杂文档上的检索准确度感到失望?基于向量的 RAG 按语义相似性进行检索,但相似性 ≠ 相关性——检索真正需要的是相关性,而相关性需要推理。对于要求理解上下文、具备领域专业知识并进行多步推理的专业文档,相似度搜索会遗漏那些相关但不相似的信息,也会返回相似但不相关的信息。

受 AlphaGo 启发,PageIndex 使用层级树索引替代向量索引,并让 LLM 沿着这棵树进行推理,就像人类专家翻阅长篇报告并阅读正确章节一样。检索分为两步:

  1. 索引:为每份文档生成树结构索引
  2. 检索:通过 LLM 推理,以 Agent 方式搜索这棵树

PageIndex 是一个无向量、基于推理的 RAG 引擎,模拟人类阅读方式,提供可追溯、可解释且感知上下文的检索,无需向量数据库或文本分块。

向量 RAG PageIndex
索引 向量索引
检索 语义相似度搜索
结果 不透明的“感觉式检索”
上下文 仅查询嵌入

它适用于财务报告、法律文档、监管申报文件、技术手册、医学文献、学术教材,以及其他任何篇幅长、结构复杂的专业文档。

import os
from pageindex import PageIndexClient

os.environ["OPENAI_API_KEY"] = "your-openai-key"

client = PageIndexClient(
    index="gpt-5.6-luna",               # 用于构建树索引的模型
    chat="gpt-5.6-sol",                 # 用于搜索树的模型
)
doc_id = client.submit_document("report.pdf")["doc_id"]

answer = client.chat("What was the 2023 operating margin?", doc_id=doc_id)
print(answer)
  • **index=:基础模型已足够。**树结构本身从文档版式中提取,无需 LLM;索引模型只负责对其进行摘要和细化,基础模型就能很好地完成这项工作。
  • **chat=:请使用你预算可承受范围内最好的模型。**对话模型会搜索树以检索信息。参见查询成本与准确率。

可配置其他模型、流式输出、多文档搜索、引用等功能。

可将 PageIndex 工具接入 OpenAI Agents SDK、Claude Agent SDK 或任何其他框架。

本地索引成本与耗时

在本地使用 gpt-5.6-luna 作为索引模型构建树,成本约为每页 0.001 美元;因此,一本 1,000 页教材的索引成本略高于 1 美元,耗时数分钟,且只需执行一次,之后的每个问题都会复用该索引。PageIndex 的设计并不严重依赖索引阶段使用的模型;在我们的实验中,基础模型不会损害质量。

索引时间也会随文档长度以可预测的方式增长。在相同本地配置下,基准测试文档(9 至 1,098 页)的处理时间约为13 秒至 4.5 分钟。

PageIndex-OSS-Benchmark 精确测量了上述快速入门中的配置:本地模式下的 PageIndexClient()、Flash 索引、不使用 OCR。该测试覆盖来自 MMLongBench-Doc-V2 的 34 份 PDF(共 1,945 页)中的 62 个查找型问题。每个问题的答案都是正文中明确陈述的事实,因此错误答案属于检索或阅读失败,而不是推理失败。

完整结果、数据和运行程序均可在基准测试仓库中查看。

单次查询成本与直接输入 PDF 的对比

检索的替代方案是在每次提问时都将完整 PDF 交给模型。该方案的成本会随文档长度增长;PageIndex 则不会,因为它只读取其推理过程到达的节点。在两种方式均返回相同答案的文档中,直接输入 PDF 在 52 页时成本高出 2.1×,在 420 页时高出 16.6×(gpt-5.6-sol,不含提示词缓存);而在 805 页时,文档已完全无法装入上下文窗口。

FinanceBench 上的领先准确率

PageIndex 在 FinanceBench(金融文档问答基准)上取得了业界领先的 98.7% 准确率,大幅优于基于向量的 RAG。

可查看完整的 FinanceBench 评测结果和博客文章。

开源版本适合以文本为主的 PDF 和本地工作流。使用 PageIndex Cloud 时,文档索引和存储在云端运行:PageIndex 会为你处理解析、OCR、图像理解、树索引构建和托管存储。对话与检索层仍然兼容你的模型,因此你可使用现有应用所采用的模型提供商来搜索云端托管的索引。

将索引和存储从本地迁移到云端,只需一个 PageIndex API key:

import os
from pageindex import PageIndexClient

os.environ["PAGEINDEX_API_KEY"] = "your-pageindex-key"
os.environ["OPENAI_API_KEY"] = "your-openai-key"

client = PageIndexClient(
    index="cloud",                       # 在 PageIndex Cloud 中构建并存储索引
    chat="gpt-5.6-sol",                  # 使用你偏好的兼容模型进行对话
)
doc_id = client.submit_document("report.pdf", wait=True)["doc_id"]
print(client.chat("What was the 2023 operating margin?", doc_id=doc_id))
本地 云端
处理对象 文本型 PDF
索引 在你的机器上运行
存储 本地目录
引用 页级
OCR 与图像理解 —
元数据 —
文件夹 —
MCP server —

关于 PageIndex Cloud 的更多信息

如需专属部署(VPC 或本地部署),请联系我们或预约演示。


请按以下格式引用本工作:

Mingtian Zhang, Yu Tang and PageIndex Team,
"PageIndex: Next-Generation Vectorless, Reasoning-based RAG",
PageIndex Blog, Sep 2025.

或使用 BibTeX 引用。

@article{zhang2025pageindex,
  author = {Mingtian Zhang and Yu Tang and PageIndex Team},
  title = {PageIndex: Next-Generation Vectorless, Reasoning-based RAG},
  journal = {PageIndex Blog},
  year = {2025},
  month = {September},
  note = {https://pageindex.ai/blog/pageindex-intro},
}

English / 原文

pi_github_banner_low

VectifyAI%2FPageIndex | Trendshift

PageIndex: Vectorless, Reasoning-based RAG

Reasoning-based RAG ◦ No Vector DB, No Chunking ◦ Context-Aware Retrieval ◦ Reads Like a Human

  • [Aug '26] 🔥 PageIndex SDK: pip install -U pageindex now ships local mode : index, retrieve, and chat entirely on your machine with your own LLM key, or point the same client at PageIndex Cloud with an API key.
  • [Aug '26] ⚡ PageIndex Flash: fast tree index generation for text-based PDFs, now the default indexing method in PageIndex SDK local mode.
  • Scale PageIndex to Millions of Documents: PageIndex File System is a file-level tree indexing layer that lets PageIndex reason over an entire corpus, not just a single document.
  • PageIndex App: a human-like document analysis agent for long professional documents.

Are you frustrated with vector database retrieval accuracy for long and complex documents? Vector-based RAG retrieves by semantic similarity. But similarity ≠ relevance — what retrieval actually needs is relevance, and relevance requires reasoning. On professional documents that demand contextual understanding, domain expertise, and multi-step reasoning, similarity search misses what is relevant but not similar, and returns what is similar but not relevant.

Inspired by AlphaGo, PageIndex replaces the vector index with a hierarchical tree index and lets an LLM reason its way through it, the way a human expert turns to and reads the right section of a long report. Retrieval happens in two steps:

  1. Index : generate a tree-structure index for each document
  2. Retrieve : agentically search that tree with LLM reasoning

PageIndex is a vectorless , reasoning-based RAG engine that mirrors how humans read , delivering traceable , explainable , and context-aware retrieval, with no vector DBs or chunking.

| Vector RAG | PageIndex
---|---|---
Index | vector index | tree index
Retrieval | semantic similarity search | LLM reasoning over the tree
Result | opaque, “vibe retrieval” | traceable to explicit references
Context | query embedding only | full context: conversation history, domain knowledge, etc.

It is ideal for financial reports, legal documents, regulatory filings, technical manuals, medical literature, academic textbooks, and any other long, complex professional document.

import os
from pageindex import PageIndexClient

os.environ["OPENAI_API_KEY"] = "your-openai-key"

client = PageIndexClient(
    index="gpt-5.6-luna",               # model to build the tree index
    chat="gpt-5.6-sol",                 # model to search the tree
)
doc_id = client.submit_document("report.pdf")["doc_id"]

answer = client.chat("What was the 2023 operating margin?", doc_id=doc_id)
print(answer)
  • index=: a basic model is sufficient. The tree structure itself is extracted from the document layout without an LLM; the index model only summarizes and refines it, which a basic model does well.
  • chat=: use the best model you can afford. The chat model searches the tree to retrieve information. See Query cost and accuracy.

Configure other models, streaming, multi-document search, citations, and more.

Drop PageIndex tools into the OpenAI Agents SDK, the Claude Agent SDK, or any other framework.

Local indexing cost and time

Building a tree locally runs about $0.001 per page with gpt-5.6-luna as the index model, so a 1,000-page textbook costs a little over a dollar and a few minutes, once, and every later question reuses it. PageIndex is designed not to rely heavily on the model used at index time, so in our experiments a basic model does not hurt quality.

Indexing time also scales predictably with document length. In the same local setup, the benchmark documents (9 to 1,098 pages) finished in roughly 13 seconds to 4.5 minutes.

PageIndex-OSS-Benchmark measures exactly the setup in the quickstart above (PageIndexClient() in local mode, flash indexing, no OCR) on 62 lookup questions over 34 PDFs (1,945 pages) drawn from MMLongBench-Doc-V2. Every question's answer is a fact stated in running text, so a wrong answer is a retrieval or reading failure , not a reasoning one.

Full results, data, and the runner are in the benchmark repo.

Cost per query vs. native PDF input

The alternative to retrieval is handing the model the whole PDF on every question. That cost grows with the document; PageIndex's does not, because it reads only the nodes its reasoning reaches. On documents where both routes return the same answer, native PDF input costs 2.1× more at 52 pages and 16.6× more at 420 (gpt-5.6-sol, prompt caching excluded) — and at 805 pages the document no longer fits in the context window at all.

Leading accuracy on FinanceBench

PageIndex reached a state-of-the-art 98.7% accuracy on FinanceBench (financial document QA benchmark), vastly outperforming vector-based RAG.

Explore the full FinanceBench evaluation results and the blog post.

The open-source version is ideal for text-heavy PDFs and local workflows. With PageIndex Cloud, document indexing and storage run in the cloud : PageIndex handles parsing, OCR, image understanding, tree-index construction, and managed storage for you. The chat and retrieval layer remains compatible with your model , so you can search the cloud-hosted index using the model provider your application already uses.

Moving indexing and storage from Local to Cloud only requires a PageIndex API key:

import os
from pageindex import PageIndexClient

os.environ["PAGEINDEX_API_KEY"] = "your-pageindex-key"
os.environ["OPENAI_API_KEY"] = "your-openai-key"

client = PageIndexClient(
    index="cloud",                       # build and store the index in PageIndex Cloud
    chat="gpt-5.6-sol",                  # use your preferred compatible model for chat
)
doc_id = client.submit_document("report.pdf", wait=True)["doc_id"]
print(client.chat("What was the 2023 operating margin?", doc_id=doc_id))

| Local | Cloud
---|---|---
Handles | Text-based PDFs | Text-based, scanned, and image-rich documents
Indexing | On your machine | Managed by PageIndex
Storage | Local directory | Cloud storage
Citations | Page-level | Block-level
OCR & image understanding | — | ✓
Metadata | — | ✓
Folders | — | ✓
MCP server | — | ✓

More About PageIndex Cloud

For dedicated deployment (VPC or on-premises), contact us or book a demo.


Leave us a star 🌟 if you like our project. Thank you!

Please cite this work as:

Mingtian Zhang, Yu Tang and PageIndex Team,
"PageIndex: Next-Generation Vectorless, Reasoning-based RAG",
PageIndex Blog, Sep 2025.

Or use the BibTeX citation.

@article{zhang2025pageindex,
  author = {Mingtian Zhang and Yu Tang and PageIndex Team},
  title = {PageIndex: Next-Generation Vectorless, Reasoning-based RAG},
  journal = {PageIndex Blog},
  year = {2025},
  month = {September},
  note = {https://pageindex.ai/blog/pageindex-intro},
}

© 2026 PageIndex AI

pageindex-wordmark-animated-288-warm