PageIndex Banner

VectifyAI%2FPageIndex | Trendshift

# PageIndex: Vectorless, Reasoning-based RAG

Reasoning-based RAG  β—¦  No Vector DB  β—¦  No Chunking  β—¦  Human-like Retrieval

🏠 Homepage  β€’   πŸ–₯️ Chat Platform  β€’   πŸ”Œ MCP  β€’   πŸ“š Docs  β€’   πŸ’¬ Discord  β€’   βœ‰οΈ Contact 

πŸ“’ Latest Updates

**πŸ”₯ Releases:** - [**PageIndex Chat**](https://chat.pageindex.ai): The first human-like document-analysis agent [platform](https://chat.pageindex.ai) built for professional long documents. Can also be integrated via [MCP](https://pageindex.ai/mcp) or [API](https://docs.pageindex.ai/quickstart) (beta). **πŸ“ Articles:** - [**PageIndex Framework**](https://pageindex.ai/blog/pageindex-intro): Introduces the PageIndex framework β€” an *agentic, in-context* *tree index* that enables LLMs to perform *reasoning-based*, *human-like retrieval* over long documents, without vector DB or chunking. **πŸ§ͺ Cookbooks:** - [Vectorless RAG](https://docs.pageindex.ai/cookbook/vectorless-rag-pageindex): A minimal, hands-on example of reasoning-based RAG using PageIndex. No vectors, no chunking, and human-like retrieval. - [Vision-based Vectorless RAG](https://docs.pageindex.ai/cookbook/vision-rag-pageindex): OCR-free, vision-only RAG with PageIndex's reasoning-native retrieval workflow that works directly over PDF page images.
--- # πŸ“‘ Introduction to PageIndex Are you frustrated with vector database retrieval accuracy for long professional documents? Traditional vector-based RAG relies on semantic *similarity* rather than true *relevance*. But **similarity β‰  relevance** β€” what we truly need in retrieval is **relevance**, and that requires **reasoning**. When working with professional documents that demand domain expertise and multi-step reasoning, similarity search often falls short. Inspired by AlphaGo, we propose **[PageIndex](https://vectify.ai/pageindex)** β€” a **vectorless**, **reasoning-based RAG** system that builds a **hierarchical tree index** from long documents and uses LLMs to **reason** *over that index* for **agentic, context-aware retrieval**. It simulates how *human experts* navigate and extract knowledge from complex documents through *tree search*, enabling LLMs to *think* and *reason* their way to the most relevant document sections. PageIndex performs retrieval in two steps: 1. Generate a β€œTable-of-Contents” **tree structure index** of documents 2. Perform reasoning-based retrieval through **tree search**
### 🎯 Core Features Compared to traditional vector-based RAG, **PageIndex** features: - **No Vector DB**: Uses document structure and LLM reasoning for retrieval, instead of vector similarity search. - **No Chunking**: Documents are organized into natural sections, not artificial chunks. - **Human-like Retrieval**: Simulates how human experts navigate and extract knowledge from complex documents. - **Better Explainability and Traceability**: Retrieval is based on reasoning β€” traceable and interpretable, with page and section references. No more opaque, approximate vector search (β€œvibe retrieval”). PageIndex powers a reasoning-based RAG system that achieved **state-of-the-art** [98.7% accuracy](https://github.com/VectifyAI/Mafin2.5-FinanceBench) on FinanceBench, demonstrating superior performance over vector-based RAG solutions in professional document analysis (see our [blog post](https://vectify.ai/blog/Mafin2.5) for details). ### πŸ“ Explore PageIndex To learn more, please see a detailed introduction of the [PageIndex framework](https://pageindex.ai/blog/pageindex-intro). Check out this GitHub repo for open-source code, and the [cookbooks](https://docs.pageindex.ai/cookbook), [tutorials](https://docs.pageindex.ai/tutorials), and [blog](https://pageindex.ai/blog) for additional usage guides and examples. The PageIndex service is available as a ChatGPT-style [chat platform](https://chat.pageindex.ai), or can be integrated via [MCP](https://pageindex.ai/mcp) or [API](https://docs.pageindex.ai/quickstart). ### πŸ› οΈ Deployment Options - Self-host β€” run locally with this open-source repo. - Cloud Service β€” try instantly with our [Chat Platform](https://chat.pageindex.ai/), or integrate with [MCP](https://pageindex.ai/mcp) or [API](https://docs.pageindex.ai/quickstart). - _Enterprise_ β€” private or on-prem deployment. [Contact us](https://ii2abc2jejf.typeform.com/to/tK3AXl8T) or [book a demo](https://calendly.com/pageindex/meet) for more details. ### πŸ§ͺ Quick Hands-on - Try the [**Vectorless RAG**](https://github.com/VectifyAI/PageIndex/blob/main/cookbook/pageindex_RAG_simple.ipynb) notebook β€” a *minimal*, hands-on example of reasoning-based RAG using PageIndex. - Experiment with [*Vision-based Vectorless RAG*](https://github.com/VectifyAI/PageIndex/blob/main/cookbook/vision_RAG_pageindex.ipynb) β€” no OCR; a minimal, reasoning-native RAG pipeline that works directly over page images.
Open in Colab: Vectorless RAG    Open in Colab: Vision RAG
--- # 🌲 PageIndex Tree Structure PageIndex can transform lengthy PDF documents into a semantic **tree structure**, similar to a _"table of contents"_ but optimized for use with Large Language Models (LLMs). It's ideal for: financial reports, regulatory filings, academic textbooks, legal or technical manuals, and any document that exceeds LLM context limits. Below is an example PageIndex tree structure. Also see more example [documents](https://github.com/VectifyAI/PageIndex/tree/main/tests/pdfs) and generated [tree structures](https://github.com/VectifyAI/PageIndex/tree/main/tests/results). ```jsonc ... { "title": "Financial Stability", "node_id": "0006", "start_index": 21, "end_index": 22, "summary": "The Federal Reserve ...", "nodes": [ { "title": "Monitoring Financial Vulnerabilities", "node_id": "0007", "start_index": 22, "end_index": 28, "summary": "The Federal Reserve's monitoring ..." }, { "title": "Domestic and International Cooperation and Coordination", "node_id": "0008", "start_index": 28, "end_index": 31, "summary": "In 2023, the Federal Reserve collaborated ..." } ] } ... ``` You can generate the PageIndex tree structure with this open-source repo, or use our [API](https://docs.pageindex.ai/quickstart) --- # βš™οΈ Package Usage You can follow these steps to generate a PageIndex tree from a PDF document. ### 1. Install dependencies ```bash pip3 install --upgrade -r requirements.txt ``` ### 2. Set your OpenAI API key Create a `.env` file in the root directory and add your API key: ```bash CHATGPT_API_KEY=your_openai_key_here ``` ### 3. Run PageIndex on your PDF ```bash python3 run_pageindex.py --pdf_path /path/to/your/document.pdf ```
Optional parameters
You can customize the processing with additional optional arguments: ``` --model OpenAI model to use (default: gpt-4o-2024-11-20) --toc-check-pages Pages to check for table of contents (default: 20) --max-pages-per-node Max pages per node (default: 10) --max-tokens-per-node Max tokens per node (default: 20000) --if-add-node-id Add node ID (yes/no, default: yes) --if-add-node-summary Add node summary (yes/no, default: yes) --if-add-doc-description Add doc description (yes/no, default: yes) ```
Markdown support
We also provide markdown support for PageIndex. You can use the `-md_path` flag to generate a tree structure for a markdown file. ```bash python3 run_pageindex.py --md_path /path/to/your/document.md ``` > Note: in this function, we use "#" to determine node heading and their levels. For example, "##" is level 2, "###" is level 3, etc. Make sure your markdown file is formatted correctly. If your Markdown file was converted from a PDF or HTML, we don't recommend using this function, since most existing conversion tools cannot preserve the original hierarchy. Instead, use our [PageIndex OCR](https://pageindex.ai/blog/ocr), which is designed to preserve the original hierarchy, to convert the PDF to a markdown file and then use this function.
--- # πŸ“ˆ Case Study: PageIndex Leads Finance QA Benchmark [Mafin 2.5](https://vectify.ai/mafin) is a reasoning-based RAG system for financial document analysis, powered by **PageIndex**. It achieved a state-of-the-art [**98.7% accuracy**](https://vectify.ai/blog/Mafin2.5) on the [FinanceBench](https://arxiv.org/abs/2311.11944) benchmark, significantly outperforming traditional vector-based RAG systems. PageIndex's hierarchical indexing and reasoning-driven retrieval enable precise navigation and extraction of relevant context from complex financial reports, such as SEC filings and earnings disclosures. Explore the full [benchmark results](https://github.com/VectifyAI/Mafin2.5-FinanceBench) and our [blog post](https://vectify.ai/blog/Mafin2.5) for detailed comparisons and performance metrics.
--- # 🧭 Resources * πŸ§ͺ [Cookbooks](https://docs.pageindex.ai/cookbook/vectorless-rag-pageindex): hands-on, runnable examples and advanced use cases. * πŸ“– [Tutorials](https://docs.pageindex.ai/doc-search): practical guides and strategies, including *Document Search* and *Tree Search*. * πŸ“ [Blog](https://pageindex.ai/blog): technical articles, research insights, and product updates. * πŸ”Œ [MCP setup](https://pageindex.ai/mcp#quick-setup) & [API docs](https://docs.pageindex.ai/quickstart): integration details and configuration options. --- # ⭐ Support Us 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}, } ``` Leave us a star 🌟 if you like our project. Thank you!

### Connect with Us [![Twitter](https://img.shields.io/badge/Twitter-000000?style=for-the-badge&logo=x&logoColor=white)](https://x.com/PageIndexAI)  [![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/vectify-ai/)  [![Discord](https://img.shields.io/badge/Discord-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com/invite/VuXuf29EUj)  [![Contact Us](https://img.shields.io/badge/Contact_Us-3B82F6?style=for-the-badge&logo=envelope&logoColor=white)](https://ii2abc2jejf.typeform.com/to/tK3AXl8T) --- ## πŸ€– GitHub Automation This repository uses automated GitHub Actions workflows to keep the issue tracker tidy. ### Overview | Workflow | Trigger | Purpose | |---|---|---| | `issue-dedupe.yml` | Issue opened Β· `workflow_dispatch` | Detects duplicate issues using Claude and labels them | | `backfill-dedupe.yml` | `workflow_dispatch` | Runs duplicate detection over historical issues | | `autoclose-labeled-issues.yml` | Daily schedule Β· `workflow_dispatch` | Closes issues labelled `autoclose` after N days of inactivity | | `remove-autoclose-label.yml` | Issue comment created | Removes the `autoclose` label when a human posts a new comment | ### Required Secrets Add the following secret to the repository (**Settings β†’ Secrets and variables β†’ Actions**): | Secret | Description | |---|---| | `AUTHROPIC_API_KEY` | Your Anthropic API key (used by `anthropics/claude-code-action`) | `GITHUB_TOKEN` is provided automatically by GitHub Actions and does not need to be added manually. ### Labels The workflows create the following labels automatically if they do not exist: | Label | Description | |---|---| | `duplicate` | Marks issues identified as duplicates | | `autoclose` | Marks issues that will be automatically closed after inactivity | ### Running the Backfill To scan historical issues for duplicates, trigger the **Backfill Duplicate Detection** workflow manually from the **Actions** tab: - **`days_back`** (default `30`) β€” how many days into the past to scan - **`dry_run`** (default `false`) β€” set to `true` to preview results without modifying issues ``` Actions β†’ Backfill Duplicate Detection β†’ Run workflow ``` ### Changing the Inactivity Threshold The default inactivity period before an `autoclose`-labelled issue is closed is **7 days**. To change it for a one-off run, trigger **Auto-close Inactive Labeled Issues** with the `inactivity_days` input. To change the default permanently, edit the `INACTIVITY_DAYS` env variable default in `.github/workflows/autoclose-labeled-issues.yml`: ```yaml INACTIVITY_DAYS: ${{ inputs.inactivity_days || '7' }} # ← change '7' here ``` ### How Duplicate Detection Works 1. When a new issue is opened, keywords from the title are used to search for the top 10 most relevant existing open issues via the GitHub Search API. 2. The issue title, body, and candidate list are passed to **Claude** (`anthropics/claude-code-action`) with a structured prompt. 3. Claude posts a comment on the issue (if it is highly confident it is a duplicate), including links to the original issue(s) and a brief explanation. 4. A follow-up step reads the comment, extracts the machine-readable result, and applies the `duplicate` and `autoclose` labels. 5. If Claude is not confident, no comment or labels are applied. --- Β© 2025 [Vectify AI](https://vectify.ai)