feat: agent evals — retrieval, scoring, and eval canary#91
Draft
kylehounslow wants to merge 5 commits intoopensearch-project:mainfrom
Draft
feat: agent evals — retrieval, scoring, and eval canary#91kylehounslow wants to merge 5 commits intoopensearch-project:mainfrom
kylehounslow wants to merge 5 commits intoopensearch-project:mainfrom
Conversation
End-to-end evaluation loop: 1. Retrieve agent traces from OpenSearch (via genai-observability-sdk-py) 2. Run HelpfulnessEvaluator (strands-agents/evals, Bedrock Claude) 3. Write score spans back to OpenSearch via score() Score spans follow OTel GenAI semantic conventions and appear in the same trace waterfall as the original agent spans. Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
- Add --trace-id flag to target a specific trace (skip session lookup) - Make session_id positional arg optional when --trace-id is used - Update README with mock and LLM-as-judge usage examples Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
Polls OpenSearch every N seconds for recent agent traces that don't yet have an evaluation span. Runs deterministic completeness scoring (input/output/tools) and writes score spans back via genai-sdk score(). Provides steady eval data for UI/UX dashboard development. Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
5 tasks
a06d787 to
796f262
Compare
Signed-off-by: Kyle Hounslow <kylhouns@amazon.com>
796f262 to
f43db39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
End-to-end agent evaluation loop for observability-stack:
genai-observability-sdk-pyChanges
examples/agent-evals/genai-sdk/
CLI tool for running evals against stored traces.
docker-compose/agent-eval-canary/
Containerized eval canary that runs on a timer:
evaluation completenessscore spans back viascore()Uses only the genai-sdk API — no raw OpenSearch client:
Configuration (.env)
Files
docker-compose/agent-eval-canary/— Dockerfile, pyproject.toml, uv.lock, eval_canary.pydocker-compose.examples.yml— agent-eval-canary service definition.env— canary configuration variablesexamples/agent-evals/genai-sdk/— main.py, README.md, pyproject.toml, uv.lockDependencies
OpenSearchTraceRetriever(list_root_spans,find_evaluated_trace_ids,get_traces)gen_ai.evaluation.resultevent on score spansTesting