Skip to main content

OpenDecision

Open-source semantic decisions for structured state and documents.

Tests Version Python License Documentation

Documentation · Doom demo · Get started · API · Examples

OpenDecision is the open-source equivalent of TypeSafe's Jev.

Send it application state or a document and typed questions. It returns structured answers that code can use directly.

Jev and OpenDecision use the same core pattern: state plus typed questions in, structured answers out. Both provide Choice, Noul, and Score.

OpenDecision provides:

  • Choice to select one option from a list.
  • Noul to measure whether a statement is true.
  • Score to place state on an ordered scale.
  • Relation to report supports, contradicts, unknown, or conflicted.
  • Document processing with evidence retrieval and source passages.
  • A Python API, a FastAPI server, and a TypeSafe SDK compatible endpoint.

The default backend is MoritzLaurer/ModernBERT-large-zeroshot-v2.0. MoritzLaurer/deberta-v3-large-zeroshot-v2.0 is an optional model. Both run locally and produce classification scores without generating text. See model selection and evaluation for the measured tradeoffs.

OpenDecision is licensed under Apache 2.0.

What can it do?

Play Doom

OpenDecision can choose actions for a bot in ViZDoom's Deadly Corridor at wall-clock speed.

The input is structured game state: health, ammo, kills, target position, goal position, and recent damage. The demo uses a disclosed tactical router, a target-tracking actuator, and a one-tic damage reflex. OpenDecision chooses between the actions available in the current tactical situation.

OpenDecision plays Doom at skill 5

Watch skill 1 · Watch skill 3 · Run the demo

These are fixed-seed recordings. No win rate has been measured.

Answer questions about data and documents

OpenDecision accepts plain text, JSON, or other Python values as state. The document API splits long documents, finds relevant passages, answers each question, and returns the passages used.

Insurance claim example

The sample claim contains a demand letter, policy facts, a police report, medical records, bills, and employer records.

Question Answer
Are the medical expenses documented? established
Is a serious injury documented? refuted
Is the rental need fully supported? unknown
Are documents still outstanding? established

The current synthetic claim experiment retrieves all 17 required facts and matches all 10 composed decisions. This is one development case. See the insurance claim benchmark.

GDPR example

The GDPR example uses a 54,171-character document split into 31 sections.

Question Answer
Must a personal data breach be reported within 72 hours? true
Must every organization appoint a Data Protection Officer? false
Can pre-ticked boxes count as valid consent? false
What is the maximum fine for serious infringements? EUR 20 million or 4% of worldwide turnover

The current retrieval experiment answers 9 of 10 objective questions correctly. See the questions and saved results.

Yes/no answer modes

POST /v1/documents/decide has one noul_mode setting:

Mode Result
binary Always chooses true or false.
three_way Returns supports, contradicts, or unknown.
both Runs both evaluations. This is the default.

In both mode, OpenDecision reports confirmed, tentative, or conflicted. A conflict has answer: null. Both score distributions remain in the response.

These modes are for document Noul questions. They are separate from the internal scoring used by Choice.

Get started

OpenDecision requires Python 3.13 or later.

pip install OpenDecision

Or add it to a uv project:

uv add OpenDecision

Run a decision in Python:

from opendecision import OpenDecisionEngine

engine = OpenDecisionEngine()

result = engine.choice(
    state="The customer was charged twice for one subscription.",
    instructions="Which team should handle this request?",
    criteria={
        "billing": "Payments, invoices, refunds, and duplicate charges",
        "technical": "Software bugs and integration problems",
        "sales": "Pricing and new purchases",
    },
)

print(result["choice"])
# billing

Start the API:

opendecision serve

In a uv project, run uv run opendecision serve.

Open http://127.0.0.1:8000/docs to send requests from the interactive API page.

The model downloads from Hugging Face on first use.

Documentation

API surface

GET  /health
POST /v1/systemone
POST /v1/documents/decide
GET  /docs
GET  /openapi.json

POST /v1/systemone accepts the core TypeSafe request shape. A local OpenDecision server can be used as the base_url for compatible clients.

Current status

OpenDecision v0.1.2 is a developer preview.

Treat the model scores as uncalibrated. Evaluate the model and thresholds on your own data before using the results in an automated decision process.

Release files for OpenDecision 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for OpenDecision 0.1.2
File Size Uploaded
opendecision-0.1.2.tar.gz 20.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for OpenDecision 0.1.2
File Interpreter ABI Platform
opendecision-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 44.5 kB

Release files / opendecision-0.1.2.tar.gz

Download URL opendecision-0.1.2.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
18e00ffb346d86b5122b030db76d63ca6d7aa3a4ad437427b6a934c036aeb9d1
BLAKE2b-256 checksum
How to use checksums
abe46f926bb67e00f903e67f2a39e3258aff4fff0d4f6421faf7a46657d1bc86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / opendecision-0.1.2-py3-none-any.whl

Download URL opendecision-0.1.2-py3-none-any.whl
Size 24.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
542b1dfe465afdbc2f02282d9dacc63b9d394aa6500484b6a2eff689a1b66dc3
BLAKE2b-256 checksum
How to use checksums
9f80f9044e35eb10f734e446a271df5e39bc805e79fb0b24f6be6d4d8b12f5af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page