Jev document boundary check

Check whether two adjacent pages belong to one document

Provide two adjacent-page excerpts and their identities. Compare a continuation with a new document, keeping changed headings and incomplete text separate from a boundary decision.

Check the page pair before proposing a split.Live API
Try an example

Original synthetic input. Edit the task or evidence to make a new API request.

Source: Workflow inspiration on X

Source and example scope

The inputs, rubric and preview are original. This window demonstrates the stated decision only; it does not reproduce the source application or its measurements.

Compare the supplied adjacent-page excerpts.

Decision rules and labels
Same documentNew documentNeed more context
A real response from the Jev API

Edit any input to explore a different decision. No request is sent until you run it.

Your next decision

Not run yet

Choose an example or write your own input, then run it to see the ranked choices.

Results are not stored by this site. Your submitted text is processed by the API provider.

What the example checks

Jev document boundary check compares two adjacent-page excerpts before proposing a split

Jev document boundary check compares two adjacent-page excerpts before proposing a split. The examples test continuation, new identities, section changes and unresolved evidence.

Several documents can share one scanned packet

A scanned packet may contain a continued invoice, a new invoice and a report that starts another section.

Read the example notes

Those changes look similar if a workflow pays attention only to headings or page-number resets. This example supplies excerpts from two adjacent pages and asks Jev for Same document, New document or Need more context. Document identity and explicit continuation are the evidence. The window accepts text; it does not inspect an uploaded scan or infer anything from page images.

Source and example scope

The attributed API-collected source discusses document tasks, including splitting, and an author-run model comparison.

Read the example notes

Our original demonstration implements one text-only boundary question with six inspectable fixtures. It does not reproduce the comparison or use the author's dataset. Jevbox's author documentation describes section trees that can continue across parsed pages. That distinction informed the case where a report changes sections without becoming a different document.

Using the result in your application

A boundary label should travel with both excerpts and their document identities.

Read the example notes

The local preview records the proposed relationship and leaves any actual split pending. A production packet tool would also need original page locations, parser output, file permissions and a reversible split operation. Those are outside this demonstration. When excerpts are incomplete or contradictory, preserving unresolved evidence is more useful than silently treating every unfamiliar heading as a new file.

The original sample files include beforePageId and afterPageId. The offline consumer returns those supplied IDs with the chosen relationship and a pending review status, after checking the exact request hash.

How it works

Try the example in four steps

Use the sample to understand the rule, then test your own input for document page boundaries.

  1. Illustration of adding the text or evidence for a decision

    Add the information to check

    Provide two adjacent-page excerpts and their identities.

  2. Illustration of defining a question and its allowed choices

    Confirm the question and labels

    Open the decision rules and keep the intended distinction between Same document, New document, Need more context. Edit the choices only when testing your own rule.

  3. Illustration of sending one input and comparing the returned choices

    Run the decision

    Use a sample first, then try your own input. Compare the selected label with the other returned probabilities.

  4. Illustration of reviewing a result and an uncertain item before using it

    Review the next step

    Review Need more context before using a result. The label is a decision about the supplied information, not an executed action.

Our API test

What the six original inputs returned.

What the six original inputs returned.
Original test inputFixture expectationObserved labelLeading probability
Continued invoiceSame documentSame document100%
Different invoice identityNew documentNew document99%
New section in one reportSame documentSame document95%
Footer without document identityNeed more contextNeed more context71%
Contradictory headerNeed more contextNeed more context97%
Instruction inside a continued reportSame documentSame document85%
  • 6 of 6 original fixture expectations matched. Contrary outputs are preserved in the table and downloads; these checks are not held-out accuracy or production suitability.
  • Measured adapter round trips: 460-1225 ms. Estimated input cost: $0.00002449-$0.00002537 per request. These observations are not a latency guarantee or invoice.

6 actual Jev API calls on October 3, 2026. Original synthetic inputs check this rubric and handoff; they do not establish held-out accuracy. Probabilities are model outputs.Verified

Understand the results

Using the result in your application

The continued-invoice case names the same invoice and supplier on both sides of the boundary.

Read the example notes

It also supplies an explicit continuation statement. The Same document expectation rests on those visible details rather than a guessed page order. This miniature test does not validate the invoice, confirm a supplier or total the line items. The returned label describes the relationship between the two supplied excerpts and becomes a pending local preview. The fixture includes unique before and after page IDs.

The consumer binds the selected relationship to that exact supplied pair, keeping the IDs separate from a numbering inference.

Different invoice identity

The second fixture introduces a different stated invoice identity and a different supplier on the next page.

Read the example notes

It explicitly describes a separate invoice beginning there. A New document label is therefore an authored split-point expectation. The model does not open either invoice or move pages between files. A real packet processor would still need to map the observed boundary to stable page IDs and obtain permission for any file operation.

A new section within the same report

The report fixture changes from Operations to Financial outlook while keeping AR-2025 as the document identity.

Read the example notes

A section boundary can be meaningful for retrieval without being a document boundary. This case checks that the chosen rubric keeps those two units separate. It does not say every repeated report title is sufficient evidence in every collection. The original request includes the identity and compatible context used for this one decision.

Source and example scope

The footer-only input changes from page four to page one but supplies no document identity or explicit new-document start.

Read the example notes

Numbering can reset for inserts, sections or another convention. The rubric does not infer a split from that number alone, so the authored expectation remains unresolved. If Jev returns New document, the contrary observation stays in the result table. Stronger header evidence would create a new request, not change the old one.

Source and example scope

The conflicting-header case deliberately supplies both a continuation of R-A and a claim that unrelated R-B begins.

Read the example notes

Neither source is declared authoritative. Need more context preserves their disagreement for review. This outcome does not delete the pages or reject every other boundary in the packet. An integration could ask for the full header, reliable parser provenance or another identity field before choosing which relationship to store.

Instruction inside a continued report

The final fixture puts an instruction-looking sentence inside a report that explicitly continues.

Read the example notes

The rubric still asks about the document relationship and treats body text as content. This case records one observation about that distinction. A matching label would not demonstrate universal prompt-injection protection. The original expectation, complete probabilities and exact request hash remain available even when the model chooses a contrary boundary label.

Source and example scope

Fixture expectations are authored before the calls. Any contrary model choice remains visible beside its expectation and complete distribution; no repeated judgment is used to obtain a preferred label.

Using the result in your application

Download the exact sample requests and saved observations below.

Read the example notes

Expected labels are original fixture checks and stay outside the request sent to Jev. The observation file preserves the complete probabilities and the hash of each exact request. Editing a task, rubric or candidate requires a fresh response; a matching sample name does not make an older answer current.

Using the result in your application

The JavaScript runner makes one independent SDK request for a chosen sample ID.

Read the example notes

It reads TYPESAFE_API_KEY privately from the environment and has no automatic retry. The Python consumer operates offline: it checks the rubric, labels, unique sample identities, request hashes and valid probability distributions before selecting a fixed local preview. A tied leading result remains pending for review.

Source and example scope

The page reports measured adapter round trips and estimated input cost for the recorded calls.

Read the example notes

Those values describe these requests, not a provider latency guarantee or a billing statement. Six deliberately authored fixtures can check the stated behavior, but they do not establish accuracy on an unseen dataset. Keep disagreements and missing-input examples when testing an integration.

Runnable offline example

Replay one request and inspect the saved preview.

View the code example
Replay commands
npm install @typesafe-ai/sdk@0.6.0
# Set TYPESAFE_API_KEY privately in your shell.
node run-choice-sample.mjs samples.json continued-invoice
python preview_choice_workflow_v4.py samples.json saved-api-results.json
Scope of this demo

Where does this decision fit?

Useful before packet splitting

  • Recognizing an explicitly continued invoice.
  • Separating a new document identity from a section change.
  • Leaving footer-only or conflicting evidence unresolved.

Needs a parser or file tool

  • Reading an original scan or performing OCR.
  • Counting pages, validating an invoice or checking a signature.
  • Splitting, moving or publishing document files.
Example FAQ

Questions about document boundaries.

A proposed split needs the page evidence and a separate file operation.

Does this split an uploaded PDF?

No. The inputs are two page excerpts. The output previews their relationship locally and performs no upload, OCR or file operation.

Is a new section a new document?

Not under this rubric when the document identity remains compatible. A section can change while the report or invoice continues.

Why is a page-number reset insufficient?

The number alone does not state document identity or a new-document start. The supplied excerpts need more context before this rubric assigns a relationship.

Can the result be used in a packet-processing tool?

It can be a reviewed input to that tool. Preserve the source page IDs and excerpts, then validate the proposed boundary before a separate authorized file operation.

Try a task from your own workflow

Change the supplied task or evidence here, then inspect the live response. Playground supports another explicit decision.