# AI use cases for Jev Doc Search (VectifyAI/jev-doc-search)

Repo: [VectifyAI/jev-doc-search](https://github.com/VectifyAI/jev-doc-search) | Use cases: 3 | Page: https://dedupedai.com/use-cases/vectifyai-jev-doc-search/

A Python project that finds the page answering a question in a long PDF by searching a PageIndex tree with Jev's Choice and Noul primitives, without a vector database.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Find the page that answers a question in a long PDF: https://dedupedai.com/use-cases/vectifyai-jev-doc-search/find-answer-page-in-long-report/
- Locate the handbook page that answers an HR question: https://dedupedai.com/use-cases/vectifyai-jev-doc-search/locate-policy-page-in-short-pdf/
- Ask many questions of one indexed annual report: https://dedupedai.com/use-cases/vectifyai-jev-doc-search/reuse-indexed-report-for-many-questions/

## How to find the page that answers a question in a long PDF with Jev Doc Search

Repo: [VectifyAI/jev-doc-search](https://github.com/VectifyAI/jev-doc-search) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Searches a 300-page report by tree, then returns the pages that answer your question.

**Who it is for:** An analyst or developer with a long annual report or technical PDF who needs the exact page for a specific figure, and who is past the point where one request can hold every page.

**The problem:** A single multiple-choice request cannot hold every page of a long document, so flat page search fails on reports over a few dozen pages.

**The outcome:** The script prints the sections and pages it kept, so you can open the right page of the report and check the figure.

### Steps

1. Run `pip install -r requirements.txt` in the repo folder.
2. Run `export TYPESAFE_API_KEY="..."` and replace the value with your TypeSafe key.
3. Run `export PAGEINDEX_API_KEY="..."` and replace the value with your PageIndex key.
4. Run `python tree_search.py NVIDIA_10K.pdf "What was NVIDIA's total revenue for fiscal year 2026?"` with your own PDF and question.
5. Note the printed doc_id, then ask another question with `python tree_search.py pi-... "<your question>"` so the PDF is not uploaded again. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the repo VectifyAI/jev-doc-search, run tree_search.py on <path-to-pdf> with the question <question>. Report the sections and pages it kept and the doc_id. Verify by opening the first kept page of the PDF and confirming the figure or claim appears there.
```

### Caveat

The README tests tree search on two annual reports and two questions, so verify each returned page against the source document before relying on it.

Risk, credentials: The script needs two API keys set as environment variables, so keep them out of shared code and shell history.

Risk, credentials: The PDF is uploaded to the cloud PageIndex service, so do not send confidential documents you are not allowed to share with that service.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vectifyai-jev-doc-search/find-answer-page-in-long-report/

## How to locate the handbook page that answers an HR question with Jev Doc Search

Repo: [VectifyAI/jev-doc-search](https://github.com/VectifyAI/jev-doc-search) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Runs flat page search on a short PDF to return the most likely page and its text.

**Who it is for:** An HR or operations person with a short handbook or policy PDF who wants the page for a question like vacation days, without reading the whole file.

**The problem:** Scanning a short PDF page by page to answer one policy question wastes time, and the document is short enough for a single Choice.

**The outcome:** The script prints the most likely page label and its text, which you can read directly.

### Steps

1. Run `pip install -r requirements.txt` in the repo folder.
2. Run `export TYPESAFE_API_KEY="..."` and replace the value with your TypeSafe key.
3. Run `python page_search.py handbook.pdf "How many vacation days do new employees get?"` with your own PDF and question.
4. Read the printed page and its text to confirm it contains the policy.

### Prompt to paste into your agent

```text
Using the repo VectifyAI/jev-doc-search, run page_search.py on <path-to-pdf> with the question <question>. Output the most likely page label and its text. Verify that the page text contains the answer by checking the wording against the PDF.
```

### Caveat

Flat page search only works while the whole document fits in one request, which the README puts at a few dozen pages, so use tree_search.py for longer PDFs.

Risk, credentials: The script needs a TypeSafe API key set as an environment variable, so keep it out of shared files.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vectifyai-jev-doc-search/locate-policy-page-in-short-pdf/

## How to ask many questions of one indexed annual report with Jev Doc Search

Repo: [VectifyAI/jev-doc-search](https://github.com/VectifyAI/jev-doc-search) | Difficulty: Intermediate | Time: 45 minutes | Basis: From the README

Uploads a report once, then reuses its doc_id to answer each new question.

**Who it is for:** A researcher or finance analyst who will ask several questions of the same annual report and wants to avoid uploading it every time.

**The problem:** Re-uploading the same long PDF for each question is slow and repeats the indexing work.

**The outcome:** After one upload, each new question returns the kept pages for that question, using the same stored doc_id.

### Steps

1. Run `pip install -r requirements.txt` in the repo folder.
2. Run `export TYPESAFE_API_KEY="..."` and `export PAGEINDEX_API_KEY="..."` with your own keys.
3. 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)
4. 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 to paste into your agent

```text
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.

Risk, credentials: The stored doc_id gives access to the indexed document in your PageIndex account, so treat it like a private reference.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/vectifyai-jev-doc-search/reuse-indexed-report-for-many-questions/
