Files
SkillCompiler/data/skills-bench/website/public/blog/fig1.html
T
2026-09-04 14:58:42 +08:00

85 lines
4.1 KiBLFS
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', -apple-system, sans-serif; background: #fff; display: flex; justify-content: center; padding: 0; }
.chart { width: 820px; padding: 32px 36px 28px; }
.title { font-size: 18px; font-weight: 700; color: #111; margin-bottom: 4px; }
.subtitle { font-size: 13px; color: #666; margin-bottom: 24px; }
.subtitle strong { color: #111; }
.bar-group { display: flex; align-items: flex-end; gap: 3px; flex-direction: column; }
.row { display: flex; align-items: center; width: 100%; margin-bottom: 10px; }
.row:last-child { margin-bottom: 0; }
.label { width: 150px; text-align: right; padding-right: 16px; font-size: 12px; color: #444; line-height: 1.3; flex-shrink: 0; }
.label .agent { font-size: 10px; color: #999; }
.bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.bar-wrap { display: flex; align-items: center; gap: 8px; height: 22px; }
.bar { height: 100%; border-radius: 3px; min-width: 2px; position: relative; transition: width 0.3s; }
.bar-no { background: #CBD5E1; }
.bar-yes { background: #3B82F6; }
.bar-val { font-size: 11px; color: #666; font-weight: 500; white-space: nowrap; }
.bar-val.yes { color: #2563EB; font-weight: 600; }
.uplift { font-size: 11px; font-weight: 700; color: #16A34A; background: #F0FDF4; padding: 2px 6px; border-radius: 3px; white-space: nowrap; margin-left: 4px; }
.legend { display: flex; gap: 20px; margin-bottom: 20px; }
.leg-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #555; }
.leg-box { width: 14px; height: 14px; border-radius: 2px; }
.divider { border: none; border-top: 1px solid #F1F5F9; margin: 6px 0 6px 150px; }
.avg-row { margin-top: 4px; padding-top: 8px; border-top: 2px solid #E2E8F0; margin-left: 150px; display: flex; align-items: center; gap: 8px; }
.avg-label { font-size: 12px; font-weight: 600; color: #111; }
.avg-val { font-size: 13px; font-weight: 700; color: #16A34A; }
</style>
</head>
<body>
<div class="chart">
<div class="title">Skills improve average performance by 16 percentage points</div>
<div class="subtitle">Score (%) across 84 evaluated tasks, 5 trials per task. Sorted by with-skills performance.</div>
<div class="legend">
<div class="leg-item"><div class="leg-box" style="background:#CBD5E1"></div>Without Skills</div>
<div class="leg-item"><div class="leg-box" style="background:#3B82F6"></div>With Skills</div>
<div class="leg-item"><span class="uplift" style="font-size:10px">+N.N</span> Uplift</div>
</div>
<div class="bar-group" id="bars"></div>
<div class="avg-row">
<span class="avg-label">Average uplift:</span>
<span class="avg-val">+16.2 pp</span>
</div>
</div>
<script>
const data = [
{ model: 'Gemini 3 Flash', agent: 'Gemini CLI', no: 31.3, yes: 48.7 },
{ model: 'Opus 4.5', agent: 'Claude Code', no: 22.0, yes: 45.3 },
{ model: 'GPT-5.2', agent: 'Codex', no: 30.6, yes: 44.7 },
{ model: 'Opus 4.6', agent: 'Claude Code', no: 30.6, yes: 44.5 },
{ model: 'Gemini 3 Pro', agent: 'Gemini CLI', no: 27.6, yes: 41.2 },
{ model: 'Sonnet 4.5', agent: 'Claude Code', no: 17.3, yes: 31.8 },
{ model: 'Haiku 4.5', agent: 'Claude Code', no: 11.0, yes: 27.7 },
];
const maxVal = 55;
const scale = v => (v / maxVal * 100) + '%';
const container = document.getElementById('bars');
data.forEach(d => {
const uplift = (d.yes - d.no).toFixed(1);
container.innerHTML += `
<div class="row">
<div class="label">${d.model}<br><span class="agent">${d.agent}</span></div>
<div class="bars">
<div class="bar-wrap">
<div class="bar bar-no" style="width:${scale(d.no)}"></div>
<span class="bar-val">${d.no.toFixed(1)}</span>
</div>
<div class="bar-wrap">
<div class="bar bar-yes" style="width:${scale(d.yes)}"></div>
<span class="bar-val yes">${d.yes.toFixed(1)}</span>
<span class="uplift">+${uplift}</span>
</div>
</div>
</div>
`;
});
</script>
</body>
</html>