Credentials. The stored doc_id gives access to the indexed document in your PageIndex account, so treat it like a private reference.
Who it is forA researcher or finance analyst who will ask several questions of the same annual report and wants to avoid uploading it every time.
The problemRe-uploading the same long PDF for each question is slow and repeats the indexing work.
The outcomeAfter one upload, each new question returns the kept pages for that question, using the same stored doc_id.
What you need first
- Python with pip available
- A TypeSafe API key from the TypeSafe console
- A PageIndex API key from the PageIndex dashboard
- The PDF you want to search
Steps
- Run
pip install -r requirements.txtin the repo folder. - Run
export TYPESAFE_API_KEY="..."andexport PAGEINDEX_API_KEY="..."with your own keys. - Run
python tree_search.py NVIDIA_10K.pdf "What was NVIDIA's gross margin for fiscal year 2026?"once, and copy the printed doc_id. (inferred, check the README) - Run
python tree_search.py pi-... "What was NVIDIA's total revenue for fiscal year 2026?"with the copied doc_id for each new question. (inferred, check the README)
Prompt for your agent
Using the repo VectifyAI/jev-doc-search, upload <path-to-pdf> once with tree_search.py, then run it with the returned doc_id for each question in <question-list>. Output the kept pages per question. Verify that the doc_id stays the same across runs and that each answer page matches the question's topic.
Caveat. The README shows doc_id reuse for one document only, so confirm the reused doc_id still returns sensible pages before asking many questions.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for VectifyAI/jev-doc-search and "Ask many questions of one indexed annual report"
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