Small decisions. Interesting possibilities.Submit contentSubmit

How it uses Jev

ContextGem's DocumentDecisionModel selects the typesafe/jev-latest provider through LiteLLM. It builds closed predicates for document aspects and Boolean concepts, plus choices for single-label concepts. It evaluates aspect predicates per paragraph, and concept questions against the relevant document text. The library applies thresholds and retains answer probabilities on extracted items.

What Jev decides

Illustrative notice-form concept ChoiceExample answers · not a recorded Jev response · Source ↗
Question 1 · C1
YOUR APP
INSTRUCTION

Choose the required form of termination notice.

STATE

The repository example supplies a service agreement stating that either party may terminate for any reason with 30 days of written notice, governed by New York law. This chart shows the notice-form concept question against that document; paragraph-aspect predicates are evaluated separately.

JEV · CHOICE
  1. Written
  2. Email
  3. Any form
  4. Not specified

App workflow

  1. Describe the document

    Create a Document from the text, then declare the aspects and concepts to extract with their descriptions, labels, and classification settings.

  2. Configure the decision model

    Select typesafe/jev-latest and provide the TypeSafe API key through CONTEXTGEM_TYPESAFE_API_KEY.

  3. Build and send questions

    DocumentDecisionModel.extract_all builds a predicate per paragraph for each aspect and questions for supported concepts, then submits the closed questions through the configured decision model.

  4. Apply answers

    The extraction uses probabilities and the decision threshold to include qualifying paragraphs and concept values. The returned items expose their probabilities.

  5. Read extracted items

    Retrieve aspect and concept items by name from the returned document.

Why it is interesting

It separates paragraph selection from closed concept extraction and retains probabilities for each extracted item. The same document interface can use a decision model for closed questions and a language model for open-ended extraction.