adachsoft / ai-evaluation-contracts
Provider-agnostic PHP contracts for evaluating text against structured AI rules.
Package info
gitlab.com/a.adach/ai-evaluation-contracts
pkg:composer/adachsoft/ai-evaluation-contracts
v0.1.0
2026-10-21 06:04 UTC
Requires
- php: ^8.3
- adachsoft/collection: ^3.0
Requires (Dev)
- adachsoft/php-code-style: ^0.7.1
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.3
- phpunit/phpunit: ^13.4
- rector/rector: ^2.7
- symplify/phpstan-rules: ^14.19
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
EvaluatorInterfacefor 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/collection2.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