{
 "schema_version": 1,
 "generated": "2026-10-24",
 "id": "vectifyai-pageindex--ask-questions-of-long-pdf-without-vectors",
 "repo": "VectifyAI/PageIndex",
 "repo_url": "https://github.com/VectifyAI/PageIndex",
 "repo_slug": "vectifyai-pageindex",
 "title": "Ask questions of a long PDF without a vector database",
 "page_title": "PageIndex tutorial: RAG over a long PDF without a vector database",
 "summary": "Submit a document, build a tree index, and chat with it using reasoning-based retrieval.",
 "who": "A financial analyst querying a 200-page annual report.",
 "problem": "Chunked vector search breaks context in long documents.",
 "outcome": "Answers retrieved by navigating the document's structure.",
 "steps": [
  "Install with `pip install -U pageindex`",
  "Set OPENAI_API_KEY",
  "Create a PageIndexClient and submit_document(\"report.pdf\")",
  "Call client.chat with your question and the doc_id"
 ],
 "agent_prompt": "Using VectifyAI/PageIndex in local mode, submit <report.pdf> and ask <question>. Return the answer with the page or section it came from and verify it in the PDF.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "Index building runs an LLM over the document, so long files cost more to index.",
 "category": "Research",
 "tags": [
  "Research"
 ],
 "lang": "python",
 "requirements": [
  "Python",
  "An OpenAI API key (local mode) or a PageIndex API key (cloud mode)"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "Local mode sends document content to your LLM provider using your key."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/vectifyai-pageindex/ask-questions-of-long-pdf-without-vectors/",
 "md": "https://dedupedai.com/use-cases/vectifyai-pageindex/ask-questions-of-long-pdf-without-vectors/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/vectifyai-pageindex--ask-questions-of-long-pdf-without-vectors.json",
 "api_version": "v1"
}
