Verdict

v0.4.0
io.github.Ustay-coder/verdict Checked 12 hours ago Published 19 days ago

Score text, files and pages against a rubric with decision models; compare models on your cases.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

validate_rubric Validate rubric

Check a rubric without storing it. Returns `{ valid: true, rubric }` with defaults filled in, or `{ valid: false, error }` saying what is wrong. Use it before `create_rubric` or `evaluate` on a rubric you wrote or edited. No model is called.

ParameterTypeDescription
rubric *The rubric to check: a JSON object, or YAML or JSON text. It needs a name and at least one criterion with an id and a name.

create_rubric Create rubric

Store a rubric and get back its id for reuse. Criteria need id/name; optional weight, scale, anchors (= rubric levels for decision models), judge ({type: decision|human|benchmark|llm|panel}; default decision/typesafe). Aggregation supports weighted_mean, weighted_sum, mean, median, min, max, geometric_mean, formula; gates; grades; passThreshold. Returns the stored rubric; pass its `id` as `rubric` to `evaluate` or `compare`. Every call stores a new rubric, so call it once per rubric.

ParameterTypeDescription
rubric *The rubric to store: a JSON object, or YAML or JSON text.

list_rubrics List rubrics

List the rubrics this server keeps: the id, name and number of criteria of each. Use it to find a rubric id for `evaluate`, `compare` or `calibration_report`. Takes no arguments.

calibration_report Calibration report

Say how far a decision model's confidence can be trusted for one rubric, from stored evaluations where a person scored the same criterion. Returns the number of model–human pairs (`n`), agreement, mean error and bias, agreement per confidence bucket, calibration error (`ece`), agreement between the human raters, and `suggestedMinConfidence`: the lowest confidence from which the model met `target`. It reads stored evaluations only; no judge is called. With no human scores yet it returns `n: 0`.

ParameterTypeDescription
rubricId *stringId of a stored rubric, from `create_rubric` or `list_rubrics`.
bucketsintegerHow many equal ranges to split confidence 0–1 into. Default 5.
targetnumberAgreement with people that a confidence bucket must reach to count as trusted, from 0 to 1. Default 0.8.

evaluate Evaluate

Score a subject against a rubric. `rubric` is a stored rubric id or an inline rubric. Inputs can be text, json, file (path or base64), url (set `screenshot: true` to let vision judges such as Clef see the page), image (PNG/JPEG/WebP, path or base64), or youtube. Returns the total score, grade, pass/fail, per-criterion scores with rationales, and any pending human tasks. It calls the rubric's judges (a decision model needs its provider's key in this server's environment) and stores the evaluation. When a criterion is judged by a person, or a decision judge is set to hand low-confidence answers…

ParameterTypeDescription
inputs *arrayWhat to judge, one or more of: {type: "text", text}, {type: "json", data}, {type: "file", path or base64, filename?}, {type: "url", url, screenshot?}, {type: "image", path or base64}, {type: "youtube"…
rubric *A stored rubric id (from `create_rubric`, `list_rubrics` or `fork_rubric`), or a whole rubric inline as an object.
idempotencyKeystringA key of your choosing (1–255 characters). Repeating the call with the same key and the same request returns what was stored, with `replayed: true`, instead of judging again.
metadataobjectFree-form fields stored with the evaluation, for your own bookkeeping.
namestringSubject name for reports

compare Compare / rank

Evaluate two or more subjects against the same rubric and rank them by total score. Returns `ranking`, best first: rank, evaluation id, subject, score, grade, pass/fail and status for each. Every subject is judged and stored as `evaluate` would; read one in full with `get_evaluation`. For a single subject, use `evaluate`.

ParameterTypeDescription
rubric *A stored rubric id (from `create_rubric`, `list_rubrics` or `fork_rubric`), or a whole rubric inline as an object.
subjects *arrayTwo or more subjects to rank, each `{ name, inputs }`, with `inputs` as in `evaluate`.
idempotencyKeystringA key of your choosing (1–255 characters). Repeating the call with the same key and the same request returns what was stored, with `replayed: true`, instead of judging again.

get_evaluation Get evaluation

Read one stored evaluation: its status, total score, grade and pass/fail, each criterion's score, confidence, probabilities and rationale, and any human tasks still pending. Use it to re-read a result or to see one entry of a `compare` ranking in full. It judges nothing.

ParameterTypeDescription
id *stringEvaluation id, as returned by `evaluate` (`id`) or `compare` (`evaluationId`).

submit_human_score Submit human score

Submit a human rater's score for a criterion that is waiting on a human. Score is a number on the criterion scale or an ordinal/binary label. Find what is waiting with `list_human_tasks`. Returns the evaluation's summary; once the last pending criterion is scored, the total, grade and pass/fail are filled in.

ParameterTypeDescription
criterionId *stringId of the criterion being scored, as the pending task names it.
evaluationId *stringThe evaluation the task belongs to: `evaluationId` from `list_human_tasks`, or `id` from `evaluate`.
raterId *stringWho is scoring. When the task names its raters, this must be one of them.
score *number | stringA number on the criterion's scale, a label of an ordinal or binary scale, or, for a choice criterion, one of its option ids.
rationalestringWhy this score, in the rater's words. Stored with the score.

reaggregate Re-aggregate

Recompute an evaluation's total from the scores it already has, under other aggregation rules: a what-if that calls no judge. Returns the summary with the new total, grade and pass/fail. Nothing is stored unless `persist` is true.

ParameterTypeDescription
aggregation *objectThe settings to apply, as in a rubric's `aggregation`: any of `method` (weighted_mean, weighted_sum, mean, median, min, max, geometric_mean, formula), `formula`, `gates`, `grades`, `passThreshold`. Se…
evaluationId *stringId of the stored evaluation to recompute.
persistbooleantrue stores the new total on the evaluation; false, the default, only returns it.

list_human_tasks List human tasks

List the criteria that are waiting for a person to score them, across stored evaluations: the evaluation id, rubric, subject, criterion and who may rate each. It is what `submit_human_score` needs. Returns an empty list when nothing is waiting.

ParameterTypeDescription
raterstringOnly tasks this rater may take: assigned to them, or open to them. Leave it out for every pending task.

check_against_humans Check a rubric against human labels

Run a rubric over a gold set (subjects people already judged) and report how often Verdict reached the same verdict: overall pass/fail agreement, per-criterion agreement, how many subjects the judge handed to a human (low-confidence escalation), and every disagreement with a preview. `rubricPath` is a local YAML/JSON rubric file, re-read on every call; `gold` is a local JSON array or JSON-lines file of {id?, name, inputs, expected?: {criterion: label}, human?: {passed?, criteria?}, labelSource?, split?}; choice criteria are labelled with an option id, and unreadable labels are rejected before…

ParameterTypeDescription
gold *stringLocal gold-set file: JSON array or JSON lines
rubricStored rubric id or inline rubric, instead of rubricPath
rubricPathstringLocal rubric file (YAML or JSON)

hub_get Read a hub card

Read a published card: its question and answers, threshold, licence, lineage, author-reported agreement numbers, versions and some public cases. `ref` is hub:owner/slug or hub:owner/slug@rv_….

ParameterTypeDescription
ref *string`hub:owner/slug` for the newest version of a card, or `hub:owner/slug@rv_…` for one version, as `hub_search` returns it.
hubstringAddress of the hub to ask. Default: the hub this server was started with (VERDICT_HUB_URL).

fork_rubric Fork a hub card

Copy a published card into this server's rubrics (a new rubric id; the card is not changed) so `evaluate` can use it. The rubric's metadata records where it came from and its licence.

ParameterTypeDescription
ref *string`hub:owner/slug` for the newest version of a card, or `hub:owner/slug@rv_…` for one version, as `hub_search` returns it.
hubstringAddress of the hub to ask. Default: the hub this server was started with (VERDICT_HUB_URL).
namestringname for the copy (default: the card's)