Skip to content

feat: Add DeepEvalHandler for third-party evaluator integration#528

Open
stone-coding wants to merge 10 commits into
aws:mainfrom
stone-coding:deepeval-handler
Open

feat: Add DeepEvalHandler for third-party evaluator integration#528
stone-coding wants to merge 10 commits into
aws:mainfrom
stone-coding:deepeval-handler

Conversation

@stone-coding

@stone-coding stone-coding commented Jun 16, 2026

Copy link
Copy Markdown

Issue P446281164 — Third-Party Evaluator Integration (Phase 1)

Description of changes Generic BaseAdapter framework that adapts 3P evaluation libraries into AgentCore-compatible Lambda handlers. Supports DeepEval, Autoevals, and is extensible for future libraries (RAGAS, etc.).

Key components:
BaseAdapter — shared orchestration: parse event (supports EvaluatorInput from @custom_code_based_evaluator() decorator) → extract fields → validate → execute with timeout → error handling
DeepEvalAdapter — runs any DeepEval BaseMetric. DeepEvalHandler alias for backward compat.
AutoevalsAdapter — runs any Autoevals scorer
Field extraction from _eval_log_records in ADOT spans (input, actual_output, retrieval_context, expected_output)
Thread-based timeout (default 290s)
field_mapper escape hatch for custom span extraction

Design decisions:
Composes with @custom_code_based_evaluator() decorator — accepts EvaluatorInput directly
Never raises unhandled exceptions — always returns valid response dict
Adding a new library = one ~20 line subclass with execute() method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants