Real model calls
Evaluate actual AI behavior, not mocked responses.
For a guided walkthrough, start with First eval in 5 minutes.
composer require --dev larswiegers/laravel-ai-evaluationpest()->extend(Tests\TestCase::class)->in('Feature', 'AgentEvals');No additional setup is required.php artisan make:ai-evals refund-policy --type=pestphp artisan make:ai-evals refund-policy --type=standaloneThe command scaffolds a starter file you can edit for your agent and expectations.
vendor/bin/pest tests/AgentEvalsphp artisan ai-evals:runEnable summaries and choose the format in your .env (or CI environment):
AI_EVAL_SUMMARY=true
AI_EVAL_SUMMARY_FORMAT=text
AI_EVAL_SUMMARY_CURRENCY=USDAI_EVAL_SUMMARY=true
AI_EVAL_SUMMARY_FORMAT=json
AI_EVAL_SUMMARY_CURRENCY=USDFor standalone JSON, JUnit, and GitHub annotation reports, see Output formats.
Run your evals and check the end of the output:
$ vendor/bin/pest tests/AgentEvals
AI Eval Summary
Total: 13
Passed: 12
Failed: 1
Prompt tokens: 7842
Completion tokens: 1966
Total tokens: 9808
Estimated cost: USD 0.070000$ php artisan ai-evals:run
{"type":"ai_eval_summary","total":13,"passed":12,"failed":1,"prompt_tokens":7842,"completion_tokens":1966,"total_tokens":9808,"estimated_cost":0.07,"currency":"USD"}