|
| 1 | +"""Bench-off task: MiniMax-M2.7 vs GLM-5.2 vs Kimi-K2.7-Code via the gateway. |
| 2 | +
|
| 3 | +Scaffold task-set (wave-1, 2026-07-08 program): small, deterministic, |
| 4 | +string-verifiable coding samples — enough to exercise the full lane |
| 5 | +(gateway -> model -> scorer -> .eval transcript -> dashboard JSON), NOT a |
| 6 | +definitive capability ranking. Grow the dataset before treating deltas as |
| 7 | +adoption evidence (the survey's rule: verify vendor numbers, never adopt on |
| 8 | +marketing claims). |
| 9 | +
|
| 10 | +Run (bench key = the capped OPS-465 lane, never the shared interactive key): |
| 11 | +
|
| 12 | + export LLM_BASE_URL=https://llm.unsigned.gg/v1 |
| 13 | + export LLM_API_KEY=$UNSIGNED_LLM_BENCH_KEY |
| 14 | + uv run inspect eval tasks/benchoff.py \ |
| 15 | + --model openai-api/llm/zai/GLM-5.2 \ |
| 16 | + --model openai-api/llm/moonshotai/kimi-k2.7-code \ |
| 17 | + --model openai-api/llm/minimax/minimax-m2.7 |
| 18 | + # NOTE: openai-api/<service>/ (not openai/) — the plain openai provider |
| 19 | + # speaks the Responses API, which the gateway's upstream lanes 404 |
| 20 | + # (verified live 2026-07-08); openai-api pins chat-completions. |
| 21 | +
|
| 22 | +.eval transcripts under logs/ are the canonical evidence (model-infra gap |
| 23 | +survey decision); export_summary.py turns them into public/data/benchoff.json. |
| 24 | +""" |
| 25 | + |
| 26 | +from inspect_ai import Task, task |
| 27 | +from inspect_ai.dataset import Sample |
| 28 | +from inspect_ai.scorer import includes |
| 29 | +from inspect_ai.solver import generate, system_message |
| 30 | + |
| 31 | +SYSTEM = ( |
| 32 | + "You are a precise coding assistant. Answer with ONLY the requested " |
| 33 | + "output — no prose, no markdown fences." |
| 34 | +) |
| 35 | + |
| 36 | +SAMPLES = [ |
| 37 | + Sample( |
| 38 | + input="Write a Python one-liner expression (no assignment) that reverses the string s. Reply with only the expression.", |
| 39 | + target="s[::-1]", |
| 40 | + ), |
| 41 | + Sample( |
| 42 | + input="What does this Python print? `print(sorted({'b': 2, 'a': 1}))` Reply with only the printed output.", |
| 43 | + target="['a', 'b']", |
| 44 | + ), |
| 45 | + Sample( |
| 46 | + input="Give the exact jq filter to extract the field `id` from every element of a top-level JSON array. Reply with only the filter.", |
| 47 | + target=".[].id", |
| 48 | + ), |
| 49 | + Sample( |
| 50 | + input="In git, what single flag makes `git log` show one commit per line? Reply with only the flag.", |
| 51 | + target="--oneline", |
| 52 | + ), |
| 53 | + Sample( |
| 54 | + input="What is the exit status of `bash -c 'false || true'`? Reply with only the number.", |
| 55 | + target="0", |
| 56 | + ), |
| 57 | + Sample( |
| 58 | + input="Complete: a Kubernetes CronJob field that prevents overlapping runs is `concurrencyPolicy: ___`. Reply with only the value.", |
| 59 | + target="Forbid", |
| 60 | + ), |
| 61 | +] |
| 62 | + |
| 63 | + |
| 64 | +@task |
| 65 | +def benchoff() -> Task: |
| 66 | + return Task( |
| 67 | + dataset=SAMPLES, |
| 68 | + solver=[system_message(SYSTEM), generate()], |
| 69 | + scorer=includes(), |
| 70 | + ) |
0 commit comments