Skip to Content

API reference

Types and functions exported by apl-ai-eval.

Entry points

AiEvalProfile

The profile implementing the apl_core::Profile trait. It is a unit struct — there is no constructor.

use apl_core::prelude::*; use apl_ai_eval::AiEvalProfile; let profile = AiEvalProfile;

Pass &profile to verify_receipt or evaluate_relation via the optional profile parameter.

register

A zero-argument helper that registers all AI-Eval diagnostic codes into the APL-Core whitelist. It does NOT wire the profile into any verifier — the profile is passed explicitly via the profile parameter. Call register() once at application startup before deserializing any DiagnosticCode value that originates from AI-Eval JSON output.

pub fn register();
fn main() { apl_ai_eval::register(); // … application startup … }

Calling register() multiple times is safe and idempotent.

AI-Eval–specific types

Frame family (apl_ai_eval::frame)

Structured accessors and validators for AI-Eval frame fields (harness, grader, dataset version, decoding parameters). See source.

Claim extensions (apl_ai_eval::claim)

Helpers for subject pinning by artifact_digest and model-family identity.

Bridge semantics (apl_ai_eval::bridge)

Stricter applicability algorithm for bridges between AI-Eval frames:

  • Tighter scope equality across source_aspects and target_aspects
  • Harness-compatibility checks against declared frame procedure
  • Grader-compatibility checks
  • Explicit rejection of bridges whose assumptions or losses are vacuous

Diagnostics (apl_ai_eval::diagnostics)

Profile-specific diagnostic codes under the apl-ai-eval-... prefix (e.g. apl-ai-eval-bridge-kind-invalid, apl-ai-eval-bridge-scope-mismatch, apl-ai-eval-predicate-disallowed, apl-ai-eval-relation-type-invalid), layered on top of APL Core’s core and pairwise diagnostic codes. All codes are declared as pub const DiagnosticCode values in apl_ai_eval::diagnostics.

Conformance

The profile MUST NOT relax APL Core requirements. Specifically:

  • Frame kernel validation is unchanged.
  • Core directionality, frame match, and scope match for bridges are enforced unchanged.
  • Only profile-specific additive checks are applied.

See The Protocol § 5.8.6 for the core bridge-applicability contract.

Last updated on