/** * StrategyPerformancePanel — per-strategy bandit performance for the current * domain scope. This is the most direct "is the bandit adapting?" view: * each row is a response format with its average reward, tier, and the cells * where it does best/worst. `standard_llm` is the no-format baseline — compare * structured formats against it to see whether the bandit is earning its keep. */ export default function StrategyPerformancePanel({ data, error, domainLabel }) { const rows = data?.global || []; return (

Strategy performance{domainLabel ? ` — ${domainLabel}` : ""}

Average reward per response format in the selected scope. Tiers: HIGH ≥ 0.60 · MEDIUM ≥ 0.00 · LOW < 0.00 · EXPLORING (too few pulls). Compare structured formats against standard_llm (the free-form baseline) to gauge adaptation.

{error &&
{error}
} {rows.length === 0 ? (
No strategy data with enough pulls in this scope yet. Send a few turns (and feedback) for this domain, then Recompute.
) : ( {rows.map((r) => ( ))}
Strategy Tier Avg reward Pulls Users Cells Best cell Worst cell
{r.strategy} {r.strategy === "standard_llm" && ( · baseline )} {r.tier} {r.avg_reward?.toFixed(3)} {r.total_pulls} {r.unique_users} {r.unique_cells} {fmtCell(r.best_cell)} {fmtCell(r.worst_cell)}
)}
); } function fmtCell(c) { if (!c) return "—"; return `${c.intent} / ${c.topic} (${c.avg_reward >= 0 ? "+" : ""}${c.avg_reward}, n=${c.count})`; }