Proposal: EvalPort export adapter for this repo's requirement-judge results (no runner changes)

Open
#387 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
tooling

Research direction

Start with evals///requirements.yaml, runner/evaluators/llm/requirements.ts, runner/evaluators/llm/utils.ts, runner/judge.ts, and the persisted results// files described in the issue. Review the EvalPort spec and its opik-openeval-adapter precedent before defining the standalone adapter. Done means the external adapter can convert these eval inputs and judge results into EvalPort data while documenting the non-lossless fields and requiring no changes here.

Written by the indexing model from the issue text.

Description

What I looked at

I read through the actual runner and data model, not just the README, before writing this:

  • evals/<category>/<eval-id>/{prompt.md, requirements.yaml, app/, reference/} — e.g. evals/skia/09-rn-skia-blur-filter/requirements.yaml
  • runner/evaluators/llm/requirements.ts — the requirements.yaml schema (version, requirements[].{id, description, weight})
  • runner/evaluators/llm/utils.ts — RequirementResult = {id, description, weight, passed, reason, evidence[], confidence?} and computeScore() (the weighted pass ratio)
  • runner/judge.ts — the persisted per-eval JSON (results/<run-id>/evals/<eval-id>.json) and summary.json shapes
  • PR #380 and artus9033's comment on it, re: the deliberate "opinionated, best-practice-enforcing" judging philosophy, plus the v2 graded partial-credit work in flight there

What I'm proposing

I maintain EvalPort, an open JSON format (TestCase / Grader / EvalSuite / ResultSet) for making eval datasets and results portable across frameworks. I'd like to build a standalone adapter package — the same pattern as the existing opik-openeval-adapter, autogen-openeval-adapter, crewai-openeval-adapter in that repo — that converts this repo's evals and judge results to/from EvalPort, with zero changes to this repo or its runner. It would live in the EvalPort repo, not here, and read evals/** and results/<run-id>/** as input only.

The mapping is unusually clean because your requirement-judge model already looks like EvalPort's grader model:

evals/<cat>/<id>/requirements.yaml → EvalSuite

// one grader per requirement — 'llm_judge' is EvalPort's closest well-known type
// for "an LLM evaluates output against a rubric"
function requirementToGrader(r: RequirementDefinition): Grader {
  return {
    id: r.id,
    type: 'llm_judge',
    description: r.description,
    weight: r.weight ?? 1,
    params: { prompt: r.description }, // model is a run-time (--model) setting here,
                                        // not fixed per requirement — see gap #4
  }
}

function evalToTestCase(evalId: string, promptMd: string, appFiles: LoadedFile[], reqs: RequirementDefinition[]): TestCase {
  return {
    id: evalId, // e.g. "skia/09-rn-skia-blur-filter"
    input: promptMd,
    context: appFiles.map(f => `// ${f.path}\n${f.content}`),
    graders: reqs.map(r => r.id),
    metadata: { 'callstack.evalPath': `evals/${evalId}` },
  }
}

results/<run-id>/evals/<id>.json → ResultSet.results[]

function requirementResultToGraderResult(r: RequirementResult): GraderResult {
  return {
    grader_id: r.id,
    type: 'llm_judge',
    score: r.confidence ?? (r.passed ? 1 : 0), // v1 has no numeric score; v2 (#380) adds
                                                // one — passes straight through once that lands
    passed: r.passed,
    reason: r.reason,
    metadata: { evidence: r.evidence, weight: r.weight },
  }
}

function persistedResultToResult(p: PersistedEvalResult): Result {
  return {
    test_case_id: p.evalId,
    actual_output: p.outputFiles.map(f => `// ${f}`).join('\n'), // see gap #1
    grader_results: p.llmJudgeRequirements.map(requirementResultToGraderResult),
    passed: p.score.ratio >= 0.5, // configurable threshold, same convention the opik adapter uses
    metadata: { judgeModel: p.judgeModel, solverModel: p.solverModel, ratio: p.score.ratio },
  }
}

summary.json (evalCount, requirementsTotal/Passed, weightedAverageScore) maps directly onto ResultSet.summary (total, pass_rate derived from requirementsPassed/Total, avg_score = weightedAverageScore).

Honest gaps — this would not be a lossless round-trip

  1. actual_output is a poor fit for multi-file submissions. Result.actual_output is one string; a solver's output is N files (app/App.tsx, sometimes _layout.tsx + index.tsx + more, per eval). The concatenation above is lossy for per-file diffing — I'd keep real per-file content in metadata.files and treat the joined string as a convenience field only.
  2. expected_output / reference/ isn't a golden answer. Your reference/ files are judge-grounding context, not something the model output is string- or semantic-diffed against. I'd map them into metadata.reference_files rather than the schema's expected_output field, so nothing implies an exact-match semantic that doesn't exist here.
  3. This can't carry the "opinionated" judging intent, only its output. As artus9033 noted on #380, scoring is deliberately opinionated — rewarding best-practice APIs, penalizing specific bad ones — not pure intent-matching. params.prompt = r.description preserves the requirement text, so a tool that re-runs the same judge model against it would reproduce that behavior, but a tool that only reads the exported ResultSet gets the result (pass/fail/reason/evidence), not the grading philosophy behind it. That's inherent to exporting judge results, not specific to this mapping.
  4. v1/v2 split, and grader-level model. llm_judge's well-known params are model + prompt; here the judge model is a --model run-time flag, the same for every requirement in a run, not fixed per grader. I'd leave it out of the shared Grader and set it on ResultSet.provider.model instead (from judgeModel), and would carry methodologyVersion from #380 in metadata under a callstack.* key, since openeval.* is reserved by the spec.

The ask

Would an export path like this be useful — e.g. for publishing results in a format other eval tooling (or a cross-framework leaderboard) could ingest without hand-parsing results/ JSON? If so, I'll build and maintain the adapter in the EvalPort repo; it needs no PR here and no runner changes. If the "results as portable data" framing doesn't fit how you want this benchmark consumed, that's a completely reasonable answer too — happy to close this out.

EvalPort spec: https://github.com/adhabnr-ux/evalport/blob/main/spec/SPEC.md
Precedent adapter (same pattern, different source project): https://github.com/adhabnr-ux/evalport/tree/main/adapters/opik-openeval-adapter

— Sahi, independent contributor (not affiliated with this project)

Dominant language
TypeScript
Stars
112
Forks
5
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from callstackincubator/evals

All issues in callstackincubator/evals

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.