🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
refactor(experiments): say baseline and not-scored, and take a number off the header line (#17009)
Nikita Kabardin7637df1e1aad
diff --git a/web/src/features/experiments/components/table/ExperimentItemsTable.tsx b/web/src/features/experiments/components/table/ExperimentItemsTable.tsxindex 480be676da..82573a1ad9 100644--- a/web/src/features/experiments/components/table/ExperimentItemsTable.tsx+++ b/web/src/features/experiments/components/table/ExperimentItemsTable.tsx@@ -983,6 +983,7 @@ export default function ExperimentItemsTable({dataType={dataType}summary={summary}comparisonName={primaryComparisonName}+ hasBaseline={hasBaseline}filterMenu={comparisonTargets.length === 0 ? undefined : (<ScoreColumnFilterMenudiff --git a/web/src/features/experiments/components/table/ExperimentScoreMatrix.tsx b/web/src/features/experiments/components/table/ExperimentScoreMatrix.tsxindex 61ef62ad7f..b42e6192c7 100644--- a/web/src/features/experiments/components/table/ExperimentScoreMatrix.tsx+++ b/web/src/features/experiments/components/table/ExperimentScoreMatrix.tsx@@ -7,7 +7,6 @@ import {type PaginationState,type Table as TanStackTable,} from "@tanstack/react-table";-import { Badge } from "@/src/components/ui/badge";import { Skeleton } from "@/src/components/ui/skeleton";import { DataTablePagination } from "@/src/components/table/data-table-pagination";import {@@ -91,10 +90,12 @@ const MatrixCell = ({{hasBaselineColumn && movement && movement.changed > 0 && (<span className="text-muted-foreground">↻{movement.changed}</span>)}- {/* Items only one of the two runs scored: never folded into the delta. */}+ {/* Items only one of the two runs scored: never folded into the delta.+ Spelled out rather than abbreviated, because a matrix cell has no+ hover to move the count into — the words are all the reader gets. */}{hasBaselineColumn && notComparable > 0 && (<span className="text-muted-foreground opacity-70">- {notComparable} n/a+ {notComparable} not scored</span>)}</span>@@ -257,21 +258,16 @@ export const ExperimentScoreMatrix = ({colorStyles.markerClass,)}/>+ {/* No `baseline` badge: this column is already the+ first one and the only one whose cells carry no+ delta, and a 150px header has room for the run's+ name or a badge, not both. */}<spanclassName="truncate font-bold"title={experiment.experimentName}>{experiment.experimentName}</span>- {experiment.isBaseline && (- <Badge- size="sm"- variant="secondary"- className="shrink-0"- >- baseline- </Badge>- )}</span></th>);diff --git a/web/src/features/experiments/components/table/ScoreColumnHeaderSummary.tsx b/web/src/features/experiments/components/table/ScoreColumnHeaderSummary.tsxindex 4b7b023439..a47526a756 100644--- a/web/src/features/experiments/components/table/ScoreColumnHeaderSummary.tsx+++ b/web/src/features/experiments/components/table/ScoreColumnHeaderSummary.tsx@@ -63,27 +63,33 @@ const SummaryRow = ({/*** A score column's header, carrying the analysis instead of only the column's- * name: this experiment's aggregate and the item count behind it, and — with a- * comparison selected — the comparison's aggregate, the signed delta and how- * many items moved which way. This is what the deleted Analytics tab was going- * to be, put where the eye already is.+ * name: the baseline experiment's aggregate and the item count behind it, and —+ * with a comparison selected — the comparison's aggregate, the signed delta and+ * how many items moved which way. This is what the deleted Analytics tab was+ * going to be, put where the eye already is.*/export const ScoreColumnHeaderSummary = ({label,dataType,summary,comparisonName,+ hasBaseline,filterMenu,}: {label: string;dataType: ScoreColumnDataType;summary: ScoreColumnSummary;comparisonName?: string;+ /**+ * Whether the run the aggregate belongs to is the selected baseline. With+ * comparisons but no baseline the first selected run stands in, and calling+ * that a baseline claims a selection the user has not made.+ */+ hasBaseline: boolean;/** The column's way into the score comparison filter, rendered beside the name. */filterMenu?: React.ReactNode;}) => {const { baseline, comparison, delta, movement } = summary;- const notComparable = movement?.notComparable ?? 0;const { icon, label: nameLabel } = splitScoreDataTypeIcon(label);return (@@ -139,11 +145,9 @@ export const ScoreColumnHeaderSummary = ({</span>)}{movement.changed > 0 && <span>↻{movement.changed}</span>}- {/* Items only one of the two runs scored: visible, and never- folded into the regression count. */}- {notComparable > 0 && (- <span className="opacity-70">{notComparable} n/a</span>- )}+ {/* The not-scored count is deliberately NOT here: it is the+ least-used of these numbers and the line only holds three.+ It stays accounted for, in the hover. */}</span>)}</div>@@ -157,7 +161,9 @@ export const ScoreColumnHeaderSummary = ({{getScoreDataTypeExplanation(dataType)}</span><SummaryRow- label={`This experiment (${DIFF_LABEL_TITLES[dataType]})`}+ label={`${+ hasBaseline ? "Baseline experiment" : "This experiment"+ } (${DIFF_LABEL_TITLES[dataType]})`}value={baseline ? formatScoreColumnAggregate(baseline) : "no values"}@@ -188,13 +194,11 @@ export const ScoreColumnHeaderSummary = ({</>)}<SummaryRow label="Unchanged" value={movement.unchanged} />- <SummaryRow- label="Not comparable"- value={movement.notComparable}- />+ <SummaryRow label="Not scored" value={movement.notComparable} /><span className="text-muted-foreground text-[10px]">- Not comparable: only one of the two experiments has a score for- the item, so it counts as neither an improvement nor a+ Not scored: only one of the two experiments has a score for the+ item — or, for a categorical score, the item has no single value+ to compare — so it counts as neither an improvement nor aregression.</span></>diff --git a/web/src/features/experiments/fns/summariseScoreColumn.ts b/web/src/features/experiments/fns/summariseScoreColumn.tsindex 97d5e285fa..fca5a02477 100644--- a/web/src/features/experiments/fns/summariseScoreColumn.ts+++ b/web/src/features/experiments/fns/summariseScoreColumn.ts@@ -30,7 +30,12 @@ type ScoreColumnMovement = {unchanged: number;/** A different value with no order to it — categorical only. */changed: number;- /** One side has no score for this item, or the two cannot be compared. */+ /**+ * One side has no score for this item, or the two cannot be compared. The+ * reader is shown this as "not scored", but the name here stays+ * `notComparable`: an item both sides scored lands in this bucket too, when+ * its categorical values leave no single value to stand for it.+ */notComparable: number;};