Skip to content

cayu.evals.calibration

Public Cayu API. Definitions are grouped by their public source module, and definitions from private implementation modules appear on their package’s page; adding a symbol does not move existing links. The import shown at each entry is a supported public namespace. Read the Python API overview and install the required extra.

from cayu.evals import compile_eval_judge_calibration_draft

Canonicalize editor material into one immutable fixed-evidence contract.

compile_eval_judge_calibration_draft(draft: EvalJudgeCalibrationDraftV1) -> EvalJudgeCalibrationDefinitionV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EVAL_JUDGE_CALIBRATION_MAX_BYTES
EVAL_JUDGE_CALIBRATION_MAX_BYTES = 2 << 20

Release source · Runtime guarantees · Capability guides

from cayu.evals import EVAL_JUDGE_CALIBRATION_MAX_TRIALS
EVAL_JUDGE_CALIBRATION_MAX_TRIALS = 10

Release source · Runtime guarantees · Capability guides

from cayu.evals import eval_judge_calibration_report_from_json

Load one bounded report without accepting an unknown wire shape.

eval_judge_calibration_report_from_json(source: str) -> EvalJudgeCalibrationReportV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import eval_judge_calibration_report_to_json

Serialize one validated report into deterministic bounded storage JSON.

eval_judge_calibration_report_to_json(report: EvalJudgeCalibrationReportV1) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION = 1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationCriterionLabelV1

One human score for an exact rubric criterion.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
criterion_id StrictStr required
score StrictStr required
EvalJudgeCalibrationCriterionLabelV1.validate_criterion_id(value: str, info) -> str
EvalJudgeCalibrationCriterionLabelV1.validate_score(value: str, info) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationDefinitionV1

Immutable calibration inputs; invoking it can only execute the judge.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
revision StrictStr required
id StrictStr required
target_key StrictStr required
assertion StructuredModelJudgeAssertionSpec required
evidence EvalJudgeCalibrationEvidenceV1 required
human_label EvalJudgeCalibrationHumanLabelV1 required
trials StrictInt Field(ge=1, le=EVAL_JUDGE_CALIBRATION_MAX_TRIALS)
EvalJudgeCalibrationDefinitionV1.validate_revision_shape(value: str, info) -> str
EvalJudgeCalibrationDefinitionV1.validate_ids(value: str, info) -> str
EvalJudgeCalibrationDefinitionV1.validate_contract() -> EvalJudgeCalibrationDefinitionV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationDraftV1

Revision-free browser material for one calibration run.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
id StrictStr required
target_key StrictStr required
assertion StructuredModelJudgeAssertionSpec required
evidence_source_id StrictStr required
task StrictStr required
final_output StrictStr required
transcript StrictStr | None None
human_criteria tuple[EvalJudgeCalibrationCriterionLabelV1, ...] Field(min_length=1, max_length=EVAL_CORPUS_MAX_JUDGE_CRITERIA)
trials StrictInt Field(default=1, ge=1, le=EVAL_JUDGE_CALIBRATION_MAX_TRIALS)
EvalJudgeCalibrationDraftV1.validate_ids(value: str, info) -> str
EvalJudgeCalibrationDraftV1.validate_evidence_source_id(value: str, info) -> str
EvalJudgeCalibrationDraftV1.validate_task(value: str, info) -> str
EvalJudgeCalibrationDraftV1.validate_final_output(value: str, info) -> str
EvalJudgeCalibrationDraftV1.validate_transcript(value: str | None, info) -> str | None
EvalJudgeCalibrationDraftV1.validate_human_criteria_order(value: object, info) -> object

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationEvidenceProvenanceV1

Operator-declared origin for fixed evidence, without implied verification.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
kind Literal['operator_supplied'] 'operator_supplied'
source_id StrictStr required
EvalJudgeCalibrationEvidenceProvenanceV1.validate_source_id(value: str, info) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationEvidenceV1

Content-addressed, public-safe candidate evidence that is never executed.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
revision StrictStr required
provenance EvalJudgeCalibrationEvidenceProvenanceV1 required
task StrictStr required
final_output StrictStr required
transcript StrictStr | None None
EvalJudgeCalibrationEvidenceV1.validate_revision_shape(value: str, info) -> str
EvalJudgeCalibrationEvidenceV1.validate_task(value: str, info) -> str
EvalJudgeCalibrationEvidenceV1.validate_final_output(value: str, info) -> str
EvalJudgeCalibrationEvidenceV1.validate_transcript(value: str | None, info) -> str | None
EvalJudgeCalibrationEvidenceV1.validate_revision() -> EvalJudgeCalibrationEvidenceV1
EvalJudgeCalibrationEvidenceV1.create(*, source_id: str, task: str, final_output: str, transcript: str | None) -> EvalJudgeCalibrationEvidenceV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationHumanLabelV1

Human ground truth bound to one exact structured rubric.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
rubric_revision StrictStr required
criteria tuple[EvalJudgeCalibrationCriterionLabelV1, ...] Field(min_length=1, max_length=EVAL_CORPUS_MAX_JUDGE_CRITERIA)
aggregate_score StrictStr required
EvalJudgeCalibrationHumanLabelV1.validate_rubric_revision(value: str, info) -> str
EvalJudgeCalibrationHumanLabelV1.validate_criteria_order(value: object, info) -> object
EvalJudgeCalibrationHumanLabelV1.validate_aggregate_score(value: str, info) -> str

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationReportV1

Immutable completed calibration with every fixed-evidence judge trial.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
revision StrictStr required
run_id StrictStr required
definition EvalJudgeCalibrationDefinitionV1 required
judge_profile JudgeProfileIdentityV1 required
candidate_route_relation Literal['independent_model', 'same_model'] required
trials tuple[EvalJudgeCalibrationTrialV1, ...] Field(min_length=1, max_length=EVAL_JUDGE_CALIBRATION_MAX_TRIALS)
EvalJudgeCalibrationReportV1.validate_revision_shape(value: str, info) -> str
EvalJudgeCalibrationReportV1.validate_run_id(value: str, info) -> str
EvalJudgeCalibrationReportV1.validate_trial_order(value: object, info) -> object
EvalJudgeCalibrationReportV1.validate_contract() -> EvalJudgeCalibrationReportV1
EvalJudgeCalibrationReportV1.create(*, run_id: str, prepared: PreparedEvalJudgeCalibration, trials: tuple[EvalJudgeCalibrationTrialV1, ...]) -> EvalJudgeCalibrationReportV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import EvalJudgeCalibrationTrialV1

One lossless judge observation compared with the fixed human label.

Bases: _PortableModel.

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
schema_version Literal[1] EVAL_JUDGE_CALIBRATION_SCHEMA_VERSION
revision StrictStr required
sequence StrictInt Field(ge=1, le=EVAL_JUDGE_CALIBRATION_MAX_TRIALS)
judgment PublishedAssertionResult required
aggregate_absolute_error StrictStr | None None
pass_agreement StrictBool | None None
EvalJudgeCalibrationTrialV1.validate_revision_shape(value: str, info) -> str
EvalJudgeCalibrationTrialV1.validate_error(value: str | None, info) -> str | None
EvalJudgeCalibrationTrialV1.validate_contract() -> EvalJudgeCalibrationTrialV1
EvalJudgeCalibrationTrialV1.create(*, sequence: int, judgment: PublishedAssertionResult, human_aggregate_score: str, threshold: str) -> EvalJudgeCalibrationTrialV1

Release source · Runtime guarantees · Capability guides

from cayu.evals import prepare_eval_judge_calibration

Resolve exact current authority without compiling any candidate request.

prepare_eval_judge_calibration(definition: EvalJudgeCalibrationDefinitionV1, target: CorpusTarget) -> PreparedEvalJudgeCalibration

Release source · Runtime guarantees · Capability guides

from cayu.evals import PreparedEvalJudgeCalibration

Process-local judge authority paired with immutable browser-reviewed input.

Decorators: @dataclass(frozen=True, slots=True).

Defaults below are source expressions; Field(...) includes schema/validation settings and default_factory creates a fresh value. Inherited declarations are included. Constructor behavior follows the model or dataclass shown in the bases/decorators.

Name Type Default
definition EvalJudgeCalibrationDefinitionV1 required
judge_profile JudgeProfileIdentityV1 required
candidate_route_relation Literal['independent_model', 'same_model'] required
evaluator _CompiledStructuredModelJudgeAssertion required

Release source · Runtime guarantees · Capability guides

from cayu.evals import run_eval_judge_calibration_trial

Execute exactly one judge call over retained text; no candidate path exists.

async run_eval_judge_calibration_trial(prepared: PreparedEvalJudgeCalibration, *, sequence: int) -> EvalJudgeCalibrationTrialV1

Release source · Runtime guarantees · Capability guides