feat(metrics): Introduce VerdictBadge component - #284
Open
kaapi-agent-bot[bot] wants to merge 1 commit into
Open
kaapi-agent-bot[bot] wants to merge 1 commit into
kaapi-agent-bot[bot] wants to merge 1 commit into
Conversation
Add a VerdictBadge component that bands numeric judge-metric scores into Good (4-5), Needs Refinement (2-3), and Needs Improvement (0-1), and render it next to metric scores in the run summary, detailed and grouped results tables, category metrics table, and run list score chips. Cosine scores and categorical/N/A entries are excluded. Closes #270 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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
Closes #270
Summary
VerdictBadgecomponent to represent judge-metric scores.MetricsOverview(run summary scores)ScoreDisplay(evaluation run list cards)DetailedResultsTableandGroupedResultsTable(per-trace metric cells)Avg Correctnesscolumn inCategoryMetricsTableapp/lib/utils/evaluation.ts, using existing color tokens.Checklist
Before submitting a pull request, please ensure that you mark these task.
npm run devandnpm run buildin the repository root and test.Original PR description
Summary
Judge-metric scores were shown as raw numbers with no indication of whether they were good, mediocre, or poor, forcing readers to remember the cutoffs. This adds a
VerdictBadgecomponent that bands a numeric score into a traffic-light verdict:The badge is rendered next to:
MetricsOverview(the run's summary scores)ScoreDisplay(used on the evaluation run list cards)DetailedResultsTableandGroupedResultsTableAvg Correctnesscolumn inCategoryMetricsTableCosine-similarity scores (detected by name match
/cosine/i, and the dedicatedavg_cosinecolumn) and categorical /N/A/ unscoreable entries render no badge, per the issue.The verdict logic (
getVerdictBand) and labels live inapp/lib/utils/evaluation.ts, reusing the existingstatus-success/status-warning/status-errorcolor tokens fromglobals.cssrather than introducing new colors.Assumptions
verdictfield on scores today (confirmed by readingapp/lib/types/evaluation.ts) — the band is computed client-side purely from the numeric value using the cutoffs given in the issue.TraceScore/SummaryScorewithdata_type: "NUMERIC") are assumed to be on the 0–5 judge-metric scale described in the issue. If a future metric uses a different numeric scale, it will need to be excluded from banding the same way cosine is.MetricsOverview,ScoreDisplay) get a badge per metric rather than one combined badge — this covers "run-level" per the parent issue (Evaluation 2.0: Transition to v2 API #265) until a dedicated overall-verdict field exists."cosine"substring match on the score name, since there's no structural flag distinguishing cosine from judge metrics inTraceScore/SummaryScore.Closes #270