Skip to Content
Introducing PageIndex Flash
CookbookPageIndex Flash

PageIndex Flash

PageIndex Flash is the open-source  engine that indexes documents on your own machine. It turns a PDF into a tree of sections: a table of contents with a summary for each section.

To answer a question, the agent reads the tree, picks the pages that matter, and reads only those. No vector database is needed.

Index Kimi K3’s 47-page technical report and ask what it was tested on, in two steps:

  1. Index the PDF on your machine.
  2. Ask a question.

Set up

Download the report from arXiv:

import requests with open("kimi_report.pdf", "wb") as f: f.write(requests.get("https://arxiv.org/pdf/2607.24653").content)
pip install -U pageindex

Everything runs on your machine, so you only need an OpenAI key:

import os from pageindex import PageIndexClient os.environ["OPENAI_API_KEY"] = "Your OpenAI API key here" client = PageIndexClient( index="gpt-5.6-luna", # the model that builds the tree; index="cloud" uses PageIndex Cloud instead chat="gpt-5.6-sol", # the model that answers )

Index the document

doc_id = client.submit_document("kimi_report.pdf")["doc_id"]

The tree is saved on disk, in ./.pageindex by default.

Ask a question

for chunk in client.chat("What benchmarks have been tested?", doc_id=doc_id, stream=True): print(chunk, end="", flush=True)
[tool_call] get_document_structure {"doc_name": "kimi_report.pdf", "wait_for_completion": true} [tool_call] get_page_content {"doc_name": "kimi_report.pdf", "pages": "25-31", "wait_for_completion": true} The report evaluates Kimi K3 on **44 public benchmarks**, grouped into four areas: ### Reasoning and knowledge - GPQA Diamond - CritPt - AA-LCR - Humanity’s Last Exam (HLE-Full), with and without tools ### Coding - DeepSWE ... Third-party evaluations additionally include the Artificial Analysis Intelligence Index, Vals Index, WebDev Arena, Text Arena, and Agent Arena. See pp. 25–31 of the report.

The agent read the tree first and saw that the evaluations are on pages 25 to 31. Then it read only those 7 pages, not all 47.

Result

A 47-page report is indexed on your own machine, and the question is answered from just 7 pages.

The notebook runs this with your key: open it in Colab .

Last updated on