Search by

adachsoft / ai-evaluation-contracts

Arkadiusz Adach

Provider-agnostic PHP contracts for evaluating text against structured AI rules.

Package info

gitlab.com/a.adach/ai-evaluation-contracts

Issues

pkg:composer/adachsoft/ai-evaluation-contracts

Statistics

Installs: 8

Dependents: 1

Suggesters: 0

Stars: 0

v0.1.0 2026-10-21 06:04 UTC

This package is not auto-updated.

Last update: 2026-10-22 02:37:14 UTC


README

Provider-agnostic PHP contracts for evaluating text against structured AI rules.

Features

  • A common EvaluatorInterface for consumer-provided evaluation adapters.
  • Immutable request and result DTOs.
  • Boolean, single-choice, and numeric-scale rule and verdict types.
  • Typed immutable collections and evaluation-related exceptions.

Requirements

  • PHP 8.3 or later.
  • adachsoft/collection 2.1.0 or later.

Installation

composer require adachsoft/ai-evaluation-contracts

Usage

Create an EvaluationRequestDto with named rules and pass it to an implementation of EvaluatorInterface provided by your application or an integration package. The returned EvaluationResultDto contains verdicts indexed by rule name.

See Evaluating descriptions for a complete contract-usage example.

License

MIT