OpenEval
A lightweight LLM-as-judge evaluation tool. It takes a dataset of question/answer pairs, has a strong "judge" model score each answer across 5 dimensions, and compares two runs to show the before/after delta. Works with OpenAI, OpenRouter, or a local Ollama model.
Install
pip install openeval-llm
The distribution name is
openeval-llm; the import and command name isopeneval.
Quickstart (CLI)
Score a JSONL dataset — one {"question", "answer", "context"} object per line:
# With a local Ollama judge (free, private)
openeval run cases.jsonl --judge-provider ollama --judge-model llama3.2
# ...or OpenAI / OpenRouter (put the API key in .env)
openeval run cases.jsonl --judge-provider openai --judge-model gpt-4o-mini
Output — per-dimension averages, token/cost/latency, and provenance (judge, dataset, timestamp):
Results — cases
┏━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Dimension ┃ Avg Score ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ faithfulness │ 0.73 │
│ relevance │ 0.93 │
│ overall │ 0.85 │
└───────────────┴───────────────┘
Before / after comparison
Run the same system two ways (e.g. a feature on vs off), then compare:
openeval compare reports/report_before.json reports/report_after.json
Dimension before after Δ
faithfulness 0.71 0.88 +0.17
overall 0.70 0.85 +0.15
The 5 dimensions
| Dimension | Measures | Weight |
|---|---|---|
| faithfulness | Is the answer factually correct? | 0.30 |
| relevance | Does it address the question? | 0.30 |
| clarity | Is it clear and well-explained? | 0.20 |
| safety | Is it safe / non-harmful? | 0.10 |
| consistency | Is it internally consistent? | 0.10 |
overall is the weighted average — faithfulness and relevance dominate.
Python API
from openeval.connectors.ollama_connector import OllamaConnector
from openeval.dataset import load_cases
from openeval.eval.evaluator import Evaluator
cases = load_cases("cases.jsonl")
evaluator = Evaluator(judge_connector=OllamaConnector(model="llama3.2"))
report = evaluator.run(cases)
print(report.avg_overall)
Highlights
- Crash-proof judge: survives when the judge wraps its answer in
```jsonfences, adds preamble, or omits a dimension (JSON extraction + neutral defaults + retry on transient errors). - Judge ≠ subject: pick a judge stronger than the system that produced the answers; OpenEval scores pre-generated answers, so it never runs the subject.
- Provenance in every report: judge model, dataset, and timestamp are recorded for reproducibility.
- Local = free: Ollama models are billed at $0.
Ollama setup
brew install ollama # macOS
ollama pull llama3.2
ollama serve
Dashboard (optional)
streamlit run openeval/report/dashboard.py
Project layout
openeval/
├── connectors/ # model providers (OpenAI / OpenRouter / Ollama)
├── dataset.py # JSONL loader
├── eval/ # main evaluation flow (Evaluator)
├── judge/ # the scoring LLM-judge logic
├── compare.py # before/after comparison
├── cli.py # `openeval run` / `openeval compare`
├── observability/ # logging, token/cost/latency, optional Langfuse
└── report/ # report helpers + Streamlit dashboard
See docs/ARCHITECTURE.md for a deeper walkthrough.
License
MIT — see LICENSE.
Metadata
Release files for openeval-llm 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openeval_llm-0.1.0.tar.gz | 141.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openeval_llm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 170.5 kB
Release files / openeval_llm-0.1.0.tar.gz
| Download URL | openeval_llm-0.1.0.tar.gz |
|---|---|
| Size | 141.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
669607faf92551e11d88aed5aed3b1376adfb8eaa668da1a59a3cdaec3326785
|
|
BLAKE2b-256 checksum How to use checksums |
08ce4263e9073f949fe4619b657854b62016f1d058dff17c20267400ecb7c38e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 10, 2026.
Transparency logRelease files / openeval_llm-0.1.0-py3-none-any.whl
| Download URL | openeval_llm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
154c919d00927fae7f2eeab270178233c64ba8dc6fbb4f7eeb936309b80fa95c
|
|
BLAKE2b-256 checksum How to use checksums |
7d0a1ccb44c46ba030fa03811d758a00bd27e4b02fb24042193e4348dfd8f382
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 10, 2026.
Transparency log