feat(ui): the continuous complexity score shows next to the tier
Benchmark (routing mode) and the dashboard's recent-requests list now print the router's raw 0..1 score under/next to the tier badge — people can see what different prompts actually weigh and tune the boundary sliders from real data. Tooltip explains the link to the Routing sliders (7 languages). Caught before commit: naming the field row.score collided with the answer- correctness fraction from evaluate() and dragged the benchmark's quality KPI down to the average complexity — renamed to cscore, KPI verified back at 100%. Dashboard tier badges also render translated names now, and the Russian locale calls the dashboard «Рабочий стол».
This commit is contained in:
Vendored
+6
-1
@@ -238,6 +238,7 @@ export async function renderBenchmark() {
|
||||
info.cost_usd = (info.cost_usd || 0) + (again.cost_usd || 0);
|
||||
if (again.tier === "high") {
|
||||
info.tier = again.tier;
|
||||
info.score = again.score;
|
||||
info.selected_model = again.selected_model;
|
||||
info.task_label = again.task_label;
|
||||
info.route_source = again.route_source;
|
||||
@@ -269,6 +270,8 @@ export async function renderBenchmark() {
|
||||
|| String(info.route_source || "").includes("degraded");
|
||||
row.task = info.task_label || "—";
|
||||
row.tier = info.tier || "—";
|
||||
row.cscore = info.score || 0; // непрерывный коэффициент сложности
|
||||
// (row.score занят долей правильности ответа из evaluate())
|
||||
row.chosen = info.selected_model || "—";
|
||||
row.source = info.route_source || "—";
|
||||
row.expected = test.label; // null = classification not judged
|
||||
@@ -402,7 +405,9 @@ export async function renderBenchmark() {
|
||||
: h("span", { class: r.taskOk ? "" : "err" },
|
||||
(r.taskOk ? "✓ " : "✗ ") + r.task,
|
||||
r.taskOk ? "" : h("div", { class: "muted small" }, t("bm.expectedLbl") + " " + (r.expected || []).join("/")))),
|
||||
h("td", {}, r.tier ? h("span", { class: "badge tier-" + r.tier }, trTier(r.tier)) : "—"),
|
||||
h("td", {},
|
||||
r.tier ? h("span", { class: "badge tier-" + r.tier }, trTier(r.tier)) : "—",
|
||||
r.cscore > 0 ? h("div", { class: "muted small mono", title: t("bm.scoreHint") }, r.cscore.toFixed(2)) : null),
|
||||
h("td", {},
|
||||
h("span", { class: "mono small" }, r.chosen || "—"),
|
||||
r.cost > 0 ? h("div", { class: "muted small" }, moneyEl(r.cost)) : null,
|
||||
|
||||
Reference in New Issue
Block a user