Add support for dataset generation with strands agents - #4
Merged
Conversation
poshinchen
reviewed
Aug 12, 2025
poshinchen
reviewed
Aug 12, 2025
|
|
||
| cases: list[Case[InputT, OutputT]] | ||
| evaluator: Evaluator[InputT, OutputT] | ||
| def __init__(self, cases: list[Case[InputT, OutputT]] = None, evaluator: Evaluator[InputT, OutputT] = Evaluator()): |
Contributor
There was a problem hiding this comment.
does it make sense to be list[Case[InputT, OutputT]] | None = None
and evaluator: Evaluator[InputT, OutputT] | None and set the Evaluator() at line 51?
Contributor
Author
There was a problem hiding this comment.
I don't have strong feelings either way, so I'll fix it to be like this. I'm not sure if there's any benefit in one way.
Contributor
Author
There was a problem hiding this comment.
I will do this fix in the refactor PR.
poshinchen
reviewed
Aug 13, 2025
| evaluation_prompt += f"<Output>{evaluation_case.actual_output}</Output>\n" | ||
| else: | ||
| if not evaluation_case.actual_output: | ||
| if evaluation_case.actual_output is None: |
Contributor
There was a problem hiding this comment.
nit: what's the intention of changing it to None instead of not?
Contributor
Author
There was a problem hiding this comment.
None is the default so we never want to include it, but if the user for some reason want an empty list or array, 'not' would not include it.
poshinchen
approved these changes
Aug 13, 2025
kylehounslow
added a commit
to kylehounslow/strands-agents-evals
that referenced
this pull request
Apr 9, 2026
…tests - Add constructor docstring with Args and usage examples (strands-agents#7) - Clean up auth type hint to just Any (strands-agents#6) - Re-raise ProviderError before broad except catch (strands-agents#3) - Add _parse_time edge case tests: empty, None, invalid, Z suffix, offset (strands-agents#4) - Add multi-trace provider test verifying flatten/regroup (strands-agents#5) - 24 tests total
kylehounslow
added a commit
to kylehounslow/strands-agents-evals
that referenced
this pull request
Apr 10, 2026
…tests - Add constructor docstring with Args and usage examples (strands-agents#7) - Clean up auth type hint to just Any (strands-agents#6) - Re-raise ProviderError before broad except catch (strands-agents#3) - Add _parse_time edge case tests: empty, None, invalid, Z suffix, offset (strands-agents#4) - Add multi-trace provider test verifying flatten/regroup (strands-agents#5) - 24 tests total
9 tasks
This was referenced Jul 25, 2026
Merged
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.
Issue #, if available:
Description of changes:
Adding support for generating Dataset from nothing, from a reference dataset, and adding to a dataset. Currently, the DatasetGenerator only support OutputEvaluator, TrajectoryEvaluator, and InteractionEvaluator for rubric generation. For InteractionEvaluator, the generator can only generate one rubric for all of the interactions. Generating separate rubric for each node/interaction is not supported yet. Other changes include: adding an Interaction TypedDict, updating the Dataset class with more methods, and add some minor fixes for a cleaner interface.
Through testing, it looks like generating multiple test cases at a time is not very deterministic in quality and quantity, so only 1 case is generated per call right now. With structured_output, creating a new class (_Case) with only fields that we want in a test case is better so that the agent doesn't generate rubbish information in other optional fields.
Future changes include: filtering and cleaning /examples.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.