Feat: Add new eval type 'match_output' for stdout grading
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- elixir
- Domain
- ai, testing-qa
Research direction
Start in evals.ex by tracing Evals.from_yml/1, Evals.grade/3, and Evals.write_and_eval/3 to understand the existing eval flow and stdout capture. Implement the new YAML structure and grading path so trimmed expected and captured output produce 1 on a match and 0 otherwise, then verify both parsing and grading behavior.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Labels: feature, eval-engine, grader
Description:
As an eval author, I want to create evaluations that test the standard output (stdout) of a script. This is crucial for testing command-line behavior, simple script outputs, or any task where the primary result is printed to the console rather than returned from a function.
This involves creating a new eval type named match_output and implementing the corresponding grading logic.
Describe the solution you'd like
Acceptance Criteria:
- The framework supports a new eval
type: "match_output"in the YAML definition. - The YAML for this type must support a new key:
eval.expected_output(string). - The
Evals.from_yml/1function must correctly parse this new structure. - A new function clause must be added to
Evals.grade/3to handle evals wheretypeis:match_output. - This new grader should:
- Execute the model-generated code using
Evals.write_and_eval/3. - Capture the
stdoutfrom the execution. - Compare the captured
stdoutwith theexpected_outputfrom the eval's definition. - The comparison should be robust against leading/trailing whitespace on both the actual and expected output.
- A successful match results in a grade of
1; a mismatch results in0.
- Execute the model-generated code using
Implementation Notes:
- The main logic will be a new function head for
Evals.grade/3inevals.ex. - The
Evals.write_and_eval/3function already capturesstdout, so it can be used directly. - Use
String.trim/1on both the captured output and the expected output before comparison.
Example YAML:
type: match_output
messages:
- type: user
text: "Write a script that prints 'Hello, World!' to the console."
eval:
expected_output: |
Hello, World!
Describe alternatives you've considered
No response
Additional context
No response
- Dominant language
- Elixir
- Stars
- 51
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ash-project/evals
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 25/100
ash-project/evals#5 · 11 comments ·
-
Feat: Implement `:tagged_summary` report formatMay be free again @SubWal claimed this 22 days ago, and no pull request is open. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ash-project/evals#2 · 3 comments · 2 reactions ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
ash-project/evals#1 · 1 reaction ·
All issues in ash-project/evals
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
taskforcesh/bullmq#5038 ·
Maintainers usually reply within 1 day
-
L: python L: ruby:bundler T: bug 🐞
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
dependabot/dependabot-core#16756 ·
Maintainers usually reply within 1 day
-
feat: signup pageOpend: medium
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 Under an hour Newbie friendliness 85/100