gen-ai-evaluation-toolkit-on-aws / evaluator-sdk
CLAUDE.md21 starsChanged 4 months agoApache-2.0View on GitHub
Python SDK for building custom evaluators that integrate with the Gen AI Evaluation Toolkit.
In this repositoryOne other file it gives its agents.
- packages/python-api/CLAUDE.mdCLAUDE.md
The file
Files
evaluator-sdk
Python SDK for building custom evaluators that integrate with the Gen AI Evaluation Toolkit.
Structure
src/evaluator_sdk/
├── __init__.py # Public exports
├── models.py # Public types: ScoreResult, TestResult, EvaluationResult/Response, EvaluatorError, type aliases
├── scorer.py # Scorer ABC, scorer decorator, scorer helpers
├── batching.py # _ScoreBatchFlusher, _ResultCollector (internal batching machinery)
├── evaluator.py # Evaluator class, EtkClient factory
└── py.typed # PEP 561 markerKey types
Evaluator— main class; callevaluate(testcases=...)to run the full pipelineScorer— ABC for plugin scorers that produce multiple sub-scoresScoreResult— value + optional error/reason for a single scoreTestResult— the single object handed to scorers (input, output, expected, context, metadata, app_metrics, error)EvaluationResult— single testcase result (input, output, expected, context, scores, error, metadata)EvaluationResponse— returned byevaluate()(report_id, job_id, results)EvaluatorError— base exceptionAppInvokeFn/ScorerFn— type aliases for user-provided callables
Commands
uv run pytest tests --ignore=tests/onebox --cov=evaluator_sdk --cov-report=term # Unit tests
uv run pytest tests/onebox # Onebox integration tests (needs python-api)
uv run ruff check src tests && uv run mypy src # Lint + mypyTests
tests/— unit tests using mocks, no monorepo dependenciestests/onebox/— integration tests that run the real python-api handler in-process via moto; only work inside the monorepo
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

