hue eval instead.
This example creates one eval-set case, publishes an exact-match evaluator, and evaluates a deterministic uppercase function. It then scores the same saved output in a new scoring run. It makes no model call and consumes no hosted-judge allowance.
Install the SDK for your language and set HUE_API_KEY to a project key created with the Read and write preset.
Content policy
Telemetry capture and evaluation storage are separate choices:
Setting the first switch to
false sends metadata-only telemetry without changing what the evaluation stores.
Eval-set inputs and reference answers are intentionally uploaded during setup. The second switch also controls target error messages, evaluator evidence, arbitrary explanations, and their local-checkpoint copies. With it disabled, local scores can still be uploaded, but historical evaluators skip unavailable output instead of invoking a callback on invented data. Declared metric values are always uploaded, including custom text metrics.
Create and run
Choose one language. The program creates setup once and saves IDs locally; later invocations reuse the same run and checkpoint directories. Add.hue-first-evaluation-* to .gitignore.
- TypeScript
- Python
Save this as
first-evaluation.ts, then run node first-evaluation.ts with Node.js 22 or 24.state.json, the next invocation stops rather than silently creating another run. Inspect Evals, Evaluators, and Runs before recovery. Registry writes have no automatic retry; the saved request can recover an uncertain acknowledgement with its original idempotency key and payload.
Read the result
Open Runs and select Uppercase baseline. The target should succeed and the exact-match metric should be true. The scoring run uses the same immutable subject ID and saved output.rescore has no target callback, so it cannot invoke the uppercase function again.
To compare a different target configuration, create a new run with the same frozen eval-set and published evaluator versions. Use a new checkpoint directory; do not edit frozen pins or reuse a checkpoint.
Missing outputs and quality failures
Read presence flags such ashasOutput and hasExpected in API responses. Do not test value truthiness: JSON null, false, 0, and "" can all be present values. TypeScript target return undefined and Python’s exported MISSING sentinel represent unavailable output. Python None is a present null.
A failed quality verdict is still a scored result, typically with passed: false. Target execution and evaluator errors have separate states. Missing evidence produces an explicit skipped result. For hue eval, each required evaluator must decide before a case can pass; an undecided required result leaves it inconclusive. Exact match preserves scalar types; false is not zero.
Resume an interrupted run
Keep the same run ID, content settings and checkpoint directory when retrying an interrupted upload. The runner saves permitted completion and scoring payloads before upload and reuses request keys. It will not rerun an uncertain target. If the process crashes after invoking a target but before saving its outcome, the runner raisesUncertainExecutionError. Inspect the execution and its side effects. Removing the checkpoint or its lock is not permission to run the target again. Checkpoints are private local files, not encrypted storage. Confirm the old process has stopped before explicitly removing a leftover .lock.
The example requires trace evidence. The runner ends the root span and waits for trace or log acknowledgement before completing the execution. An export failure does not silently become omitted evidence, and a fresh exporter cannot prove that an earlier export succeeded. Explicit omission is a separate policy: TypeScript { mode: "omit", reason: "This local run does not retain a trace snapshot." } or Python TraceEvidence("omit", "This local run does not retain a trace snapshot."); supply a meaningful reason if you choose it.
Local built-ins also include string inclusion and JSON Schema draft 2020-12. Custom callbacks run on your machine without claimed side-effect cancellation. Manual and hosted-judge evaluator pins stay pending for their workflows; this example does not dispatch them or claim live hosted-model acceptance.