Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,9 @@ export function TaskInstanceViewer({
id: string;
score: number;
result: boolean;
message: string;
message?: string;
description?: string;
weight?: number;
title?: string;
justification?: string;
}[];
Expand Down Expand Up @@ -1084,6 +1086,9 @@ export function TaskInstanceViewer({
>
Score: {(v.score * 100).toFixed(0)}%
</span>
<code className="text-[10px] font-mono text-[var(--muted-foreground)]">
{verifierId}
</code>
</div>

{results.map((r, i) => (
Expand All @@ -1107,6 +1112,14 @@ export function TaskInstanceViewer({
<span className="text-sm font-semibold">
{(r.id ?? `check ${i + 1}`).replace(/_/g, ' ')}
</span>
{typeof r.weight === 'number' && r.weight < 0 && (
<span
className="text-[10px] font-semibold uppercase px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600"
title={`Penalty check (weight −${Math.abs(r.weight)}): when it fails, weighted_average subtracts ${Math.abs(r.weight)} from the weighted sum; passing adds nothing`}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Tooltip overstates partial penalties

For a check with weight: -2, score: 0.5, and result: false, the tooltip says 2 is subtracted from the weighted sum. The actual subtraction is 1: weighted_average uses score, not result, to calculate the penalty. This makes the explanation disagree with the displayed score. Describe the subtraction as (1 - score) * abs(weight), or qualify the current explanation as applying only to binary scores.

Knowledge Base Used: Evaluation, review, and scoring

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agent_env/explorer/ui/src/components/task-instance-viewer.tsx
Line: 1118

Comment:
**Tooltip overstates partial penalties**

For a check with `weight: -2`, `score: 0.5`, and `result: false`, the tooltip says 2 is subtracted from the weighted sum. The actual subtraction is 1: `weighted_average` uses `score`, not `result`, to calculate the penalty. This makes the explanation disagree with the displayed score. Describe the subtraction as `(1 - score) * abs(weight)`, or qualify the current explanation as applying only to binary scores.

**Knowledge Base Used:** [Evaluation, review, and scoring](https://app.greptile.com/scale-ai/-/custom-context/knowledge-base/scaleapi/agentenv-framework/-/docs/evaluation-and-review.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Cursor Fix in Claude Code Fix in Codex

>
penalty −{Math.abs(r.weight)}
</span>
)}
{typeof r.score === 'number' && r.score !== 0 && r.score !== 1 && (
<span className="text-xs text-[var(--muted-foreground)]">
score:{' '}
Expand All @@ -1116,9 +1129,9 @@ export function TaskInstanceViewer({
</span>
)}
</div>
{r.message ? (
{(r.message ?? r.description) ? (
<p className="text-xs text-[var(--muted-foreground)] whitespace-pre-wrap">
{r.message}
{r.message ?? r.description}
</p>
) : null}
</div>
Expand Down
Loading