Repository navigation
packages/agents Evals data model → EvalPort (portable eval result JSON) — worth a reporter? #71
adhabnr-ux
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi maintainers,
I'm Sahi, maintainer of EvalPort — an Apache-2.0 open interchange spec for portable LLM evaluation
TestCase/Grader/ResultSetdata, with SDKs in TypeScript and Python (evalport-sdk) and 32 tested framework adapters (Ragas, Braintrust, MLflow, LangSmith, DeepEval, etc. — see adapters/).I went through
packages/agents/src/Evals/before writing this — it's a genuinely rich, well-designed eval model:EvalResult(id(),description(),verdict()returningEvalVerdict::Passed|Failed|Scored|Skipped,assertions(),duration(),error(),tokens()),AssertionResult(name(),score()0–1,severity(),threshold(),passed(),message()),JudgeScore(score,reason,evidence, optionalrun),EvalDataset/EvalDatasetRow, andEvalRunResult(aggregatecounts/tokens()/provenance()). It's one of the more complete eval result shapes I've come across in any language, and it maps cleanly onto EvalPort'sTestCase/Grader/ResultSetJSON shapes.Since this is a PHP project and EvalPort's own SDKs are TS/Python, I'm not proposing a package dependency — just flagging that the two shapes line up well enough that a small, dependency-free serializer living entirely inside
instructor-php(in the spirit of the existingJUnitEvalReporter/ArtifactEvalReporter, implementingCanReportAgentEvals) could let CI-produced eval results interop with other eval tooling via a shared JSON format — the same roleragas-openeval-adapterandbraintrust-openeval-adapterplay for their ecosystems in Python.Concretely, the mapping (real fields on both sides):
EvalResult::id()/verdict()/duration()/error()→ aResultSetresult:{test_case_id, passed: verdict() === Passed, duration_ms: duration()*1000, error}AssertionResult::name()/score()/passed()/message()→ that result'sgrader_results[]entry:{grader_id: name(), type: 'custom', score: score(), passed: passed(), reason: message()}EvalDatasetRow::toArray()→ an EvalPortTestCase(input,expected_output,graders,metadata) almost as-isEvalRunResult::toArray()'scounts/tokens()/provenance()→ResultSet.summary/ResultSet.metadataA small illustrative sketch, using only the real accessors above:
This is a discussion, not a PR — I wanted to check whether this is something you'd even want before writing one (e.g. as an optional
EvalPortReporteralongside the existing reporters). Happy to draft it if there's interest, or this can just sit here as food for thought.Repo: https://github.com/adhabnr-ux/evalport
Spec: https://github.com/adhabnr-ux/evalport/blob/main/spec/SPEC.md
— Sahi, independent contributor (not affiliated with this project)
All reactions