You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Comparing evaluation runs (baselines, regressions) - plans for RubyLLM::Evaluation?
#1054
Congrats on 2.1 - RubyLLM::Evaluation looks great, and having datasets, model grading and the rake task in core makes a lot of sense.
The "Comparing Runs" section of the running guide says an evaluation is most useful when you compare runs over time - before and after a prompt change, or across two models. Today that comparison is left to the reader. Do you plan to add it to RubyLLM::Evaluation (e.g. diffing two saved reports, a baseline file, a rake run that fails on regressions), and would you rather have it in core or in an extension?
I'm asking because this is the part of RubyLLM::Contract that overlaps most, and I'd rather contribute than build a parallel version. What it does today, on its own eval DSL:
# CI: fail when a case that passed in the saved baseline now failsexpect(SummarizeArticle).topass_eval("regression").without_regressionsRubyLLM::Contract::RakeTask.newdo |t|
t.minimum_score=0.8t.maximum_cost=0.05# suite budget; refuses when a case cannot be pricedt.fail_on_regression=trueend# Prompt A/B on the same casesSummarizeArticleV2.compare_with(SummarizeArticleV1,eval: "regression",model: "gpt-4.1-mini").safe_to_switch?# Same cases across models, cheapest one above a scoreSummarizeArticle.compare_models("regression",candidates: [{model: "gpt-4.1-nano"},{model: "gpt-4.1-mini"}]).best_for(min_score: 0.95)
The baseline diff is per case: regressed, improved, newly skipped, plus the score delta.
If it fits your plans, I'd be happy to open a PR for something small in core, for example a comparison of two Evaluation::Reports (per-case regressed / fixed, pass-rate and cost delta) and an option for the rake task to compare against a saved report. If you'd rather keep core minimal, I'd look into building these on top of Evaluation::Report in Contract, so the two don't drift apart.
Either way, a pointer to the direction you have in mind would help me avoid working against it.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi Carmine,
Congrats on 2.1 -
RubyLLM::Evaluationlooks great, and having datasets, model grading and the rake task in core makes a lot of sense.The "Comparing Runs" section of the running guide says an evaluation is most useful when you compare runs over time - before and after a prompt change, or across two models. Today that comparison is left to the reader. Do you plan to add it to
RubyLLM::Evaluation(e.g. diffing two saved reports, a baseline file, a rake run that fails on regressions), and would you rather have it in core or in an extension?I'm asking because this is the part of RubyLLM::Contract that overlaps most, and I'd rather contribute than build a parallel version. What it does today, on its own eval DSL:
The baseline diff is per case: regressed, improved, newly skipped, plus the score delta.
If it fits your plans, I'd be happy to open a PR for something small in core, for example a comparison of two
Evaluation::Reports (per-case regressed / fixed, pass-rate and cost delta) and an option for the rake task to compare against a saved report. If you'd rather keep core minimal, I'd look into building these on top ofEvaluation::Reportin Contract, so the two don't drift apart.Either way, a pointer to the direction you have in mind would help me avoid working against it.
Thanks!
All reactions