Skip to content

jev-doc-search

Long-document search that walks a PageIndex tree, asking Jev Choice which page or branch answers the question, with no embeddings.

Projectprototype

Overview

jev-doc-search finds the page that answers a question in a long document using Jev's Choice primitive instead of a vector database. For short documents, flat page search is one Choice where each page is an option described by its own text, and the most probable page is the answer. A small script runs this on any PDF, such as an employee handbook.

When a document is too long for Jev to read at once, it uses PageIndex, which converts the document into a hierarchical tree. Jev then picks a node, then one of its children, and so on, choosing among a handful of options at each level regardless of document length. The README frames this as working on reports of around 300 pages with no embeddings. It uses the typesafe_sdk Python package and pypdf.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich page contains the answer to the question?—
ChoiceWhich child node of this section should be opened next?—

How it works

  1. Extract page text from the PDF or build a PageIndex tree
  2. Ask Jev a Choice with the question as state and pages or nodes as options
  3. For trees, descend into the chosen node and repeat
  4. Return the most likely page and its text

Strengths

  • No vector database or embeddings
  • Scales to long documents via tree descent
  • Few lines of code for flat search

Caveats

  • Accuracy figures not given in the excerpt
  • Tree search depends on PageIndex structure quality

Getting started

`python page_search.py handbook.pdf "How many vacation days do new employees get?"` after installing dependencies and setting API keys.

At a glance

Type
Project
Status
prototype
Language
Python
Runtime
Scripts using typesafe_sdk
Has code
yes

Use cases and integrations

How curated lists describe it

  • Long-document search that walks a PageIndex tree and asks Jev which branches to open.

    MrJev/awesome-jev

Frequently asked questions

What does Jev decide?

Which page, or which branch of the document tree, answers the question.

Why no embeddings?

Page search is framed as a multiple-choice question that Jev answers directly.

How does it handle long documents?

It walks a PageIndex tree, choosing among a few children at each level.

Related projects

  • JSON-in/JSON-out CLI that reranks, filters or compresses search results with independent Jev Noul checks, keeping metadata intact.

    CLIbetaRust
  • Permission-aware document library using Jev or Cloudflare Clef for hierarchical search, passage scoring and automatic filing.

    LibrarybetaTypeScript
  • PDF question-answering demo where Jev chooses which extracted text chunk answers each question, shown with its location.

    DemoprototypePython
  • Browser PDF search by meaning: Jev answers a yes/no per line on whether it answers your query, and matching lines light up.

    ProxyprototypeTypeScript
  • Classifies tax PDF pages into 261 IRS forms and 7 page kinds with one Jev request per page and a confidence gate.

    ProjectproductionTypeScript
  • Rust tool that asks Jev which PDF pages genuinely need OCR, extracting text pages locally and sending only the rest to OCR.

    ProjectbetaRust