Credentials. Local mode sends document content to your LLM provider using your key.
Who it is forA financial analyst querying a 200-page annual report.
The problemChunked vector search breaks context in long documents.
The outcomeAnswers retrieved by navigating the document's structure.
What you need first
- Python
- An OpenAI API key (local mode) or a PageIndex API key (cloud mode)
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
Prompt for your agent
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.
Caveat. Index building runs an LLM over the document, so long files cost more to index.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for VectifyAI/PageIndex and "Ask questions of a long PDF without a vector database"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer