Skip to content

Claude Sonnet 5.5 (effort default (no --effort flag) · thinking on) on Water-quality sensor anomaly flags and daily means

AClaude Sonnet 5.5default · thinking on · Claude Code 2.1.299 (headless -p) · cloud · 2026-10-20 · by @bobsiopener

Trust 80%Fully autonomoussuccess · first try
Estimated cost
$0.07
Wall time
25s
Human step-ins
0
Outcome
Pass

Compare with other models on this task →

Summary

Exact prompt

# Water-quality sensor anomaly flags `input.json` (synthetic buoy data) names `readings.csv` (`ts` "YYYY-MM-DDTHH:MM", `sensor`, `value`; rows are shuffled) and gives `stuck_n`, `window`, `spike_k`, and per-sensor `config` (`min`, `max`, `spike_floor`, `max_step`). Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json` writes `answer.json` and `chart.svg`. Fresh inputs are used too. ## Rules (per sensor, rows in ascending ts) 1. **missing**: value is blank or not a finite number (e.g. `err`, `nan`). It is skipped entirely (it does not break or extend a stuck run). 2. For other values, track the run of consecutive non-missing readings with exactly the same value (all flags included). Then the first match wins: - **range**: value < min or > max. - **stuck**: the current run length >= `stuck_n`. - **spike**: at least `window` ok values exist; with the last `window` ok values, med = median and MAD = median of |x - med|; flag if |v - med| > max(spike_k * MAD, spike_floor). - **rate**: |v - last ok value| > max_step. - else **ok**. Only ok values are used as "ok values", in daily means and in the chart. 3. `daily_means[sensor][date]` = mean of ok values that day (3 decimals); `counts[sensor]` has keys ok, missing, range, stuck, spike, rate; `flags` lists every non-ok reading `{"ts", "sensor", "flag"}` sorted by ts then sensor. ## Visual output: chart.svg Static, self-contained SVG (root `<svg>`, no scripts, images, links or external assets; renders headless) with `<polyline id="series-<sensor>">` for each sensor (`series-temp_c`, `series-do_mgl`, `series-ph`) and an element `id="flag-summary"`. The drawing itself is not graded. ## answer.json `{"counts": {...}, "daily_means": {...}, "flags": [...]}` ## Scoring Hidden checks (partial credit; all must pass): `missing_and_range`, `stuck_detection`, `spike_and_rate` (with ok counts), `flag_list`, `daily_means` (within 0.0011), `chart_svg_static` (chart.svg exists, follows the static rules, has the ids/tags above), `fresh_run_1`, `fresh_run_2`. 60-second limit per run.

Shuffled rows, a stuck run that ignores missing values but includes flagged ones, a robust median/MAD spike test with a floor that only uses ok history, a rate test against the last ok value, and flag precedence. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

Benchmark code for comparing AI models, not navigation or safety software.

Success criteria: 1. missing_and_range 2. stuck_detection 3. spike_and_rate 4. flag_list 5. daily_means 6. chart_svg_static 7. fresh_run_1 8. fresh_run_2

Setup notes: Use Case Scout batch 10 case k12-water-quality-anomalies (offline fixture). Prepared with batch10/prepare.sh; hidden key/tests kept outside the agent's work dir. Prompt = TASK.md verbatim. Scored with the scout's scorer: `python score.py WORKDIR KEYDIR`. Tools: Read/Write/Edit/Glob/Grep/Bash, web disabled. Single run, no retries. Visual output (chart.svg) rendered offline to PNG with google-chrome headless, network blocked, 1280x800 at ~3 s after load. Claude Code's own reported cost for claude-sonnet-5.5: $0.071314. Score: 8/8. Cost is an ESTIMATE: measured tokens x pricing.json list price (Claude Pro subscription, nothing billed); input_tokens include cache reads and writes. Single run.

Estimated cost List-price estimate; not actually billed.

Output

Metrics

Estimated cost
$0.07
Wall time
25s
Human step-ins
0
Turns
4
Model usage
ModelInput tokOutput tokCost
AClaude Sonnet 5.5anthropic/claude-sonnet-5.5effort default (no --effort flag) · thinking on80,7832,784$0.07

Reproduce this run

  1. Use the use case prompt on the use case page.
  2. Same setup: Claude Sonnet 5.5 (anthropic/claude-sonnet-5.5, effort default (no --effort flag) · thinking on) via Claude Code 2.1.299 (headless -p), cloud.
  3. It counts as a success only if it meets every success criterion: 1. missing_and_range 2. stuck_detection 3. spike_and_rate 4. flag_list 5. daily_means 6. chart_svg_static 7. fresh_run_1 8. fresh_run_2
  4. Log model, tokens, wall time, human step-ins and the evidence log, then submit it as a reproduction. A different model? Submit a head-to-head rerun.

How runs are scored: Methodology.

Was this useful?

⇄ Rerun on another model

Automated checks

Trust 80% comes from these checks (how Trust % works).

Evidence log
[
 {
  "duration_api_ms": 23529,
  "stop_reason": "end_turn",
  "session_id": "[REDACTED]",
  "total_cost_usd": 0.0713143,
  "usage": {
   "input_tokens": 8,
   "cache_creation_input_tokens": 9072,
   "cache_read_input_tokens": 71703,
   "output_tokens": 2784,
   "output_tokens_details": {
    "thinking_tokens": 157
   },
   "server_tool_use": {
    "web_search_requests": 0,
    "web_fetch_requests": 0
   },
   "service_tier": "standard",
   "cache_creation": {
    "ephemeral_1h_input_tokens": 9072,
    "ephemeral_5m_input_tokens": 0
   },
   "inference_geo": "global",
   "iterations": [
    {
     "input_tokens": 2,
     "output_tokens": 515,
     "cache_read_input_tokens": 21276,
     "cache_creation_input_tokens": 335,
     "cache_creation": {
      "ephemeral_5m_input_tokens": 0,
      "ephemeral_1h_input_tokens": 335
     },
     "type": "message"
    }
   ],
   "speed": "standard",
   "fallback_credit": null
  },
  "modelUsage": {
   "claude-sonnet-5-5": {
    "inputTokens": 8,
    "outputTokens": 2784,
    "cacheReadInputTokens": 71703,
    "cacheCreationInputTokens": 9072,
    "webSearchRequests": 0,
    "costUSD": 0.0713143,
    "contextWindow": 1000000,
    "maxOutputTokens": 128000,
    "thinkingTokens": 157,
    "canonicalModel": "claude-sonnet-5-5",
    "provider": "firstParty",
    "costBasis": "list"
   }
  },
  "permission_denials": [],
  "terminal_reason": "completed",
  "fast_mode_state": "off",
  "fast_mode_disabled_reason": "sdk_opt_in_required",
  "subagent_stats": {
   "spawned": 0,
   "requested": {
    "background": 0,
    "foreground": 0,
    "unset": 0
   },
   "started_in_background": 0,
   "max_depth": 0,
   "spawned_by_subagents": 0,
   "completed": 0,
   "failed": 0,
   "killed": {
    "parent": 0,
    "user": 0,
    "system": 0
   },
   "refused": {
    "depth_limit": 0,
    "concurrency_limit": 0,
    "budget": 0
   },
   "by_type": {}
  },
  "safety_stops": 0,
  "is_error": false,
  "num_turns": 4,
  "subtype": "success",
  "api_error_status": null,
  "result": "I wrote `solve.py` and ran it on `input.json` (with `python3`, since `python` isn't installed here). It wrote `answer.json` and `chart.svg` without errors. I couldn't check the output against the hidden checks, so I don't know the score. I also didn't render the SVG; I only confirmed it has three polylines.\n\nCounts from that run:\n\n| Sensor | ok | missing | range | stuck | spike | rate |\n|---|---|---|---|---|---|---|\n| `temp_c` | 134 | 3 | 1 | 2 | 4 | 0 |\n| `do_mgl` | 131 | 3 | 1 | 3 | 3 | 3 |\n| `ph` | 135 | 2 | 1 | 3 | 2 | 1 |\n\n- **Rules:** it follows the rules as written. A stuck run counts every non-missing reading with the same value, flagged or not. Spike and rate checks use only ok values.\n- **Input handling:** it reads the readings file from the folder `input.json` is in, and it takes sensors from `config` plus any extra sensor names found in the data. Missing means blank or non-finite (`err`, `nan`, `inf`).\n- **Missing flags:** missing readings also appear in `flags`, with the flag `missing`.\n- **Chart:** `chart.svg` has a `series-<sensor>` polyline per sensor, drawn from ok values only. It also has a `flag-summary` text element with the counts.\n- **Output location:** `chart.svg` is written next to the `answer.json` path you give.",
  "ttft_ms": 2471,
  "type": "result",
  "duration_ms": 24055,
  "uuid": "[REDACTED]",
  "ttft_stream_ms": 1984,
  "time_to_request_ms": 349,
  "first_content_frame_ms": 1985,
  "queued_turn_count": 0,
  "result_index": 0
 }
]

Get new runs and ranking changes weekly