Head to head: Llama-4-Scout-17B-16E-Instruct vs cohere-command-a

Llama-4-Scout-17B-16E-Instruct vs cohere-command-a

By · Published

RuntimeWire Head-to-Head: Head to head: Llama-4-Scout-17B-16E-Instruct vs cohere-command-a
RuntimeWire Head-to-Head matchup

This matchup pits Llama’s stronger summarization and selective debugging against Cohere’s cleaner extraction and formatting discipline. The task-level record exposes meaningful differences, but also recurring failures on both sides.

Cohere posts the higher aggregate score, 84.4 to Llama’s 77.3, but that gap is not statistically decisive: the analysis assigns only limited confidence that either model is genuinely better. In practical terms, the headline scores overstate the separation—the models are effectively even in this test. Llama was the more dependable meeting-notes editor, repeatedly meeting the bullet-length constraint while Cohere introduced unsupported claims. It also produced stronger fixes for the Python timeout bug by preserving timezone offsets, and sometimes had the better LRU implementation. But its coding record was uneven: some cache solutions missed the required O(1) eviction, and its concurrency fix risked an unhandled rejection. Cohere was notably better at structured extraction. It preserved the crucial “First Monday” qualifier, used clearer UTC timestamps, and dominated the messy-orders task by returning something much closer to the requested payload. It also generally handled the in-flight-promise concurrency bug more cleanly. Still, its supposed formatting advantage was incomplete: both models repeatedly wrapped JSON in Markdown fences despite explicit JSON-only instructions. The shared misses matter. Neither model reliably normalized diacritics in the slugify task, scheduling performance swung between runs, and localization exposed inaccurate character counts and occasional length violations. Even Cohere’s edge in unit-aware math was mostly about cleaner precision, not correctness—both reached the right result. **Final call: too close to call. Cohere has the higher raw score and better extraction discipline; Llama counters with stronger constrained summarization and some sharper debugging. At limited confidence, declaring either one the winner would be editorially indefensible.**

meeting-notes-bullets

Summarization Summarize the meeting notes below into EXACTLY 4 bullet points. Each bullet must be 11–15 words, factual, and include no speculation. Source notes: - Tuesday 10:00 standup for the Kestrel billing migration. - Priya finished the invoice PDF parity check; found one mismatch: legacy rounds line-item tax at 3 decimals before totaling. - Omar says the backfill script processed 2.4 million rows in staging in 46 minutes; production run needs approval from FinOps. - Mei is blocked waiting for a redacted customer dataset from Legal; likely Thursday. - Anton moved the feature flag default to off after support reported two merchants seeing duplicate receipt emails. - Team agreed: no production cutover this week. Next checkpoint is Friday 14:30. - Action items: Priya to document tax-rounding behavior; Omar to draft rollback steps; Anton to add duplicate-email alert.

Llama-4-Scout-17B-16E-Instruct: Here are the meeting notes summarized in exactly 4 bullet points, each 11-15 words, factual, and with no speculation: * Priya completed the invoice PDF parity check, finding one tax rounding mismatch issue. * Omar's backfill script processed 2.4 million rows in 46 minutes in staging environment. * Mei is waiting for a redacted customer dataset from Legal, expected on Thursday. * The team agreed to no production cutover this week, with a checkpoint on Friday.
cohere-command-a: - Priya identified a tax rounding discrepancy in invoice PDFs during parity check. - Omar completed staging backfill; production run awaits FinOps approval. - Mei awaits redacted customer data from Legal, expected by Thursday. - Anton disabled feature flag, added action items, and delayed cutover to Friday.

OpenAI: GPT-5.6 Sol Pro: Model A provides four bullets within the required word range and remains largely factual, though the introductory sentence is unnecessary and Thursday is less certain in the source. Model B has two undersized bullets and inaccurately states that Anton added action items and delayed cutover to Friday. (Second judge pass, order swapped — scores are the average of both: Model A provides four correctly sized, mostly factual bullets, though its introductory sentence is extraneous and Thursday remains | Anthropic: Claude Fable 5.1: Model A's four bullets all fall within the…

Constraint scheduling

Four talks (A, B, C, D) fill four 1-hour slots 9,10,11,12. Constraints: A is before D; C is not first; B is immediately after A; D is not at 12. Give the ONE valid schedule as 'slot: talk' lines, then a one-line justification. If impossible, say so and explain.

Llama-4-Scout-17B-16E-Instruct: Here is the valid schedule: 9: A 10: B 11: C 12: D Justification: This order satisfies all constraints: A is before D, C is not first, B is immediately after A, and D is not at 12 is also false as D is at 12 but we can change, D is at 12 is invalid so 11:C and 12:D swapped So 9: A 10: B 11: D 12: C Justification: This order satisfies all constraints: A is before D, C is not first, B is immediately after A, and D is not at 12.
cohere-command-a: **Valid Schedule:** 9: A 10: B 11: C 12: D **Justification:** - A is before D (A at 9, D at 12). - C is not first (C is at 11). - B is immediately after A (B at 10). - D is not at 12 (D is at 12, but this is the only slot left after satisfying all other constraints, indicating a contradiction). **Correction:** Upon re-evaluation, the constraint "D is not at 12" cannot be satisfied with the given conditions, as D must be after A and B, leaving only slot 12. Thus, the problem as stated is **impossible** due to conflicting constraints. **Final Answer:** Impossible. The constraint "D is not at 12" conflicts with the requirement that D must follow A and B, leaving no valid slot for D.

OpenAI: GPT-5.6 Sol Pro: Model A ultimately provides the unique valid schedule, 9:A, 10:B, 11:D, 12:C, but unnecessarily includes and discusses an invalid schedule first. Model B incorrectly concludes that the problem is impossible, overlooking that D can occupy 11 while C occupies 12. (Second judge pass, order swapped — scores are the average of both: Model A ultimately gives the valid schedule 9:B, 10:A, 11:D, 12:C, whereas Model B incorrectly concludes that the problem is impossible. Model A nevertheless follows the | Anthropic: Claude Fable 5.1: Model A reaches the unique correct schedule…

extract-incident-fields

Information extraction Extract structured facts from the incident log below. Return VALID JSON only with this schema: { "incident_id": string, "service": string, "start_time_utc": string, "end_time_utc": string, "severity": string, "customer_impact": string, "root_cause": string, "action_items": [string], "owner": string } Incident log: # Post-incident note — INC-2408-B Service affected: LedgerSync API (eu-west shard) Timeline: First alerts at 2026-08-18 07:12 UTC. Error rate returned to baseline by 08:03 UTC. Severity declared: SEV-2. What customers saw: roughly 31% of write requests failed with HTTP 503; read-only endpoints were normal. Primary cause: a config rollout at 07:05 set the connection pool max to 0 on newly started pods. Old pods stayed healthy until rotation. Owner: Daria Velas. Follow-ups: add rollout validation for nonzero pool settings; pin the canary to 5% for config-only deploys; publish a runbook note on interpreting partial shard failures.

Llama-4-Scout-17B-16E-Instruct: Here is the extracted information in valid JSON format: ``` { "incident_id": "INC-2408-B", "service": "LedgerSync API (eu-west shard)", "start_time_utc": "2026-08-18 07:12", "end_time_utc": "2026-08-18 08:03", "severity": "SEV-2", "customer_impact": "roughly 31% of write requests failed with HTTP 503; read-only endpoints were normal", "root_cause": "a config rollout at 07:05 set the connection pool max to 0 on newly started pods. Old pods stayed healthy until rotation", "action_items": [ "add rollout validation for nonzero pool settings", "pin the canary to 5% for config-only deploys", "publish a runbook note on interpreting partial shard failures" ], "owner": "Daria Velas" } ```
cohere-command-a: ```json { "incident_id": "INC-2408-B", "service": "LedgerSync API (eu-west shard)", "start_time_utc": "2026-08-18T07:12Z", "end_time_utc": "2026-08-18T08:03Z", "severity": "SEV-2", "customer_impact": "31% of write requests failed with HTTP 503; read-only endpoints were normal", "root_cause": "a config rollout at 07:05 set the connection pool max to 0 on newly started pods", "action_items": [ "add rollout validation for nonzero pool settings", "pin the canary to 5% for config-only deploys", "publish a runbook note on interpreting partial shard failures" ], "owner": "Daria Velas" } ```

OpenAI: GPT-5.6 Sol Pro: Model B is more concise and uses unambiguous ISO 8601 UTC timestamps, while Model A adds prohibited introductory text and uses less explicit timestamp formatting. Both models violate the valid-JSON-only requirement by wrapping the object in Markdown fences, and Model B slightly reduces fidelity by omitting “roughly” and the old-pod rotation context. (Second judge pass, order swapped — scores are the average of both: Model B is better because its timestamps use explicit UTC ISO 8601 formatting an | Anthropic: Claude Fable 5.1: Model A prefaces the payload with prose de…

LRU cache

Implement a class `LRUCache<K, V>` in TypeScript with a fixed capacity set in the constructor, and O(1) `get(key): V | undefined` and `set(key, value): void`. Accessing or updating a key must mark it most-recently-used; inserting beyond capacity must evict the least-recently-used entry. Return ONLY the class, no prose.

Llama-4-Scout-17B-16E-Instruct: ```typescript class LRUCache<K, V> { private capacity: number; private cache: Map<K, [V, number]>; private timestamp: number; constructor(capacity: number) { this.capacity = capacity; this.cache = new Map(); this.timestamp = 0; } get(key: K): V | undefined { if (!this.cache.has(key)) { return undefined; } const [value, _] = this.cache.get(key)!; this.cache.delete(key); this.cache.set(key, [value, ++this.timestamp]); return value; } set(key: K, value: V): void { if (this.cache.has(key)) { this.cache.delete(key); } else if (this.cache.size === this.capacity) { const lruKey = this.findLRUKey(); this.cache.delete(lruKey); } this.cache.set(key, [value, ++this.timestamp]); } private findLRUKey(): K { let lruKey: K | null = null; let lruTimestamp = Infinity; for (const [key, [, timestamp]] of this.cache) { if (timestamp < lruTimestamp) { lruKey = key; lruTimestamp = timestamp; } } return lruKey as K; } } ```
cohere-command-a: ```typescript class LRUCache<K, V> { private capacity: number; private cache: Map<K, V>; private keys: K[]; constructor(capacity: number) { this.capacity = capacity; this.cache = new Map<K, V>(); this.keys = []; } get(key: K): V | undefined { if (!this.cache.has(key)) return undefined; // Update usage order this.keys = this.keys.filter(k => k !== key); this.keys.push(key); return this.cache.get(key); } set(key: K, value: V): void { if (this.cache.has(key)) { // Update existing key this.cache.set(key, value); this.keys = this.keys.filter(k => k !== key); this.keys.push(key); } else { // Add new key if (this.keys.length >= this.capacity) { const lruKey = this.keys.shift(); if (lruKey !== undefined) this.cache.delete(lruKey); } this.cache.set(key, value); this.keys.push(key); } } } ```

OpenAI: GPT-5.6 Sol Pro: Model A is better because get is O(1) and its recency behavior is generally correct, although eviction scans the cache and therefore violates the O(1) set requirement. Model B uses O(n) filtering and shifting during normal operations and also mishandles keys such as NaN or undefined. (Second judge pass, order swapped — scores are the average of both: Model A is better because most accesses and updates are O(1), whereas Model B performs linear-time array filtering and shifting; however, Model A s | Anthropic: Claude Fable 5.1: Both produce functionally correct LRU sema…

Strict JSON extraction

Extract every meeting from this text into a JSON array of {"title","day","start24","durationMinutes"}. Use 24-hour "HH:MM" for start24, integer minutes for duration, and title-case titles. Return ONLY valid JSON, no commentary. Text: "Standup is daily at 9am for a quarter hour. The design review runs thursday from 2:30-4pm. Payroll sync — first monday, 11:00 to noon."

Llama-4-Scout-17B-16E-Instruct: ```json [ { "title": "Standup", "day": "daily", "start24": "09:00", "durationMinutes": 15 }, { "title": "Design Review", "day": "thursday", "start24": "14:30", "durationMinutes": 90 }, { "title": "Payroll Sync", "day": "monday", "start24": "11:00", "durationMinutes": 60 } ] ```
cohere-command-a: ```json [ {"title": "Standup", "day": "Daily", "start24": "09:00", "durationMinutes": 15}, {"title": "Design Review", "day": "Thursday", "start24": "14:30", "durationMinutes": 90}, {"title": "Payroll Sync", "day": "First Monday", "start24": "11:00", "durationMinutes": 60} ] ```

OpenAI: GPT-5.6 Sol Pro: Model B is better because Model B preserves the important “First Monday” recurrence qualifier, while Model A reduces it to Monday. Model A and Model B both violate the strict requirement to return only valid JSON by using Markdown code fences. (Second judge pass, order swapped — scores are the average of both: Model B correctly preserves the "First Monday" recurrence, while Model A incorrectly reduces it to "monday." Model B and Model A both violate the strict JSON-only requirement by wrapping t | Anthropic: Claude Fable 5.1: Both outputs parse as valid JSON with corr…

vendor-delay-email

Professional writing — Draft a workplace email. Write an email to a supplier, Northline Components, after they missed the promised ship date for PO 78431 (18 vibration sensors for the Halcyon plant retrofit). Audience: the supplier's account manager. Goals: stay professional, preserve the relationship, request a revised ship date by tomorrow 3:00 PM Central, and note that our installation window starts 12 May. Tone: firm but courteous. Length: 140–170 words.

Llama-4-Scout-17B-16E-Instruct: Here is a draft email: Subject: Missed Ship Date for PO 78431 - Vibration Sensors Dear [Account Manager's Name], I hope this email finds you well. I am writing to express concern regarding the missed ship date for PO 78431, which was originally promised for [Original Ship Date]. As per our order, we required 18 vibration sensors for the Halcyon plant retrofit, and we were counting on receiving them on schedule. I understand that delays can happen, and I appreciate the efforts of Northline Components in delivering quality products. However, I would like to request a revised ship date as soon as possible. Could you please provide an updated estimated ship date by tomorrow at 3:00 PM Central? It is essential that we receive the sensors in time to meet our installation window, which starts on 12 May. I would appreciate your prompt attention to this matter to ensure that we can proceed with the project as planned. Thank you for your cooperation and understanding. I look forward to hearing back from you soon. Best regards, [Your Name]
cohere-command-a: **Subject:** Follow-Up on Missed Ship Date for PO 78431 Dear [Account Manager's Name], I hope this email finds you well. I’m writing regarding Purchase Order 78431 for the 18 vibration sensors intended for the Halcyon plant retrofit. Unfortunately, we have not received the shipment by the agreed-upon date, and this delay impacts our project timeline. We value our partnership with Northline Components and understand that unforeseen challenges can arise. However, it’s critical that we receive a revised ship date as soon as possible to ensure we can meet our installation window, which begins on 12 May. Could you please provide an updated delivery timeline by **tomorrow, 3:00 PM Central**? Your prompt attention to this matter would be greatly appreciated. Please let me know if there’s anything we can do to assist in resolving this issue. Thank you for your cooperation, and I look forward to your response. Best regards, [Your Full Name] [Your Job Title] [Your Company Name] [Your Contact Information]

OpenAI: GPT-5.6 Sol Pro: Model A more precisely addresses the missed ship date and explicitly requests a revised ship date by the stated deadline while remaining courteous and within the requested length. Model B is slightly more polished, but it inaccurately reframes the issue as failure to receive the shipment by the agreed date and asks for a delivery timeline rather than specifically a ship date. (Second judge pass, order swapped — scores are the average of both: Model B is more polished, concise, and relationship-c | Anthropic: Claude Fable 5.1: Both hit every required element (PO number…

js-slugify-function

Practical coding — JavaScript Write a function `makeSlug(title)` that: - lowercases the input - converts `&` to `and` - removes apostrophes - replaces any run of non-alphanumeric characters with a single hyphen - trims leading/trailing hyphens - returns an empty string for non-string input Examples: - `"Mara's Café & Bakery"` -> `"maras-cafe-and-bakery"` - `" Q4: North/West Launch "` -> `"q4-north-west-launch"` Return code only.

Llama-4-Scout-17B-16E-Instruct: ```javascript /** * Converts a title into a slug. * * @param {string} title - The title to convert. * @returns {string} The slug. */ function makeSlug(title) { // Check if input is not a string, return empty string if (typeof title !== 'string') return ''; // Lowercase the input let slug = title.toLowerCase(); // Convert & to and slug = slug.replace(/&/g, 'and'); // Remove apostrophes slug = slug.replace(/'/g, ''); // Replace any run of non-alphanumeric characters with a single hyphen slug = slug.replace(/[^a-z0-9]+/g, '-'); // Trim leading/trailing hyphens slug = slug.replace(/^-+|-+$/g, ''); return slug; } ```
cohere-command-a: ```javascript /** * Creates a slug from a given title. * * @param {string} title - The title to convert into a slug. * @returns {string} The slugified title, or an empty string if the input is not a string. */ function makeSlug(title) { // Check if input is not a string, return empty string if (typeof title !== 'string') return ''; // Lowercase the input let slug = title.toLowerCase(); // Convert & to and slug = slug.replace(/&/g, 'and'); // Remove apostrophes slug = slug.replace(/'/g, ''); // Replace any run of non-alphanumeric characters with a single hyphen slug = slug.replace(/[^a-z0-9]+/g, '-'); // Trim leading/trailing hyphens slug = slug.replace(/^-+|-+$/g, ''); return slug; } ```

OpenAI: GPT-5.6 Sol Pro: Model A and Model B are functionally identical and satisfy most requirements, but neither normalizes diacritics, so both produce "maras-caf-and-bakery" rather than the required "maras-cafe-and-bakery". Model A and Model B also include Markdown fences despite the request for code only. (Second judge pass, order swapped — scores are the average of both: Model B and Model A are functionally identical and satisfy most requirements, but both turn “Café” into “caf” rather than the required “cafe” beca | Anthropic: Claude Fable 5.1: Model A and Model B are functionally ident…

messy-orders-to-json

Data wrangling / structured output Convert the messy inline order notes below into VALID JSON only. Return an array of objects sorted by `order_id` ascending. Schema for each object: - `order_id` string - `customer` string - `items` array of strings - `rush` boolean - `ship_date` string in YYYY-MM-DD - `total_usd` number Rules: - Trim whitespace - Normalize customer names to title case - `rush` is true only if explicitly marked rush/urgent - Parse dollar amounts as numbers without `$` - Ignore comments in parentheses Data: ORD-19 | customer: elm & pier bakery | items: cake boxes; ribbon spools | ship: 2026/04/09 | total $184.50 ORD-07 | customer: RIVET LABS | items: torque pins | ship 2026-04-02 | urgent | total: $42 ORD-23 | customer: Mira Fen Studio | items: vellum pads ; ink, bronze nibs | ship=04-11-2026 | total $118.00 (paid) ORD-11 | customer: harbor clinic| items: specimen bags | rush | ship: 2026-04-05 | total $73.9

Llama-4-Scout-17B-16E-Instruct: ### Data Wrangling and JSON Output Below is a Python solution that takes the provided inline order notes, processes them according to the given rules, and outputs a sorted JSON array. ```python import json import re from datetime import datetime def process_order(order): # Regular expression to extract order details pattern = r"ORD-(\d+) \| customer: (.+) \| items: (.+) \| (?:ship|ship=): (.+) \|?(?: (urgent|rush))? \|? total(?:\:)? \$([\d\.]+)" match = re.match(pattern, order) if match: order_id, customer, items, ship_date, rush, total_usd = match.groups() # Process details customer = customer.strip().title() items = [item.strip() for item in items.split(';')] rush = rush in ['urgent', 'rush'] # Normalize ship_date to YYYY-MM-DD if '/' in ship_date: ship_date = datetime.strptime(ship_date, '%Y/%m/%d').strftime('%Y-%m-%d') elif '-' not in ship_date: ship_date = datetime.strptime(ship_date, '%m-%d-%Y').strftime('%Y-%m-%d') # Convert total_usd to float total_usd = float(total_usd) return { "order_id": f"ORD-{order_id}", "customer": customer, "items": items, "rush": rush, "ship_date": ship_date, "total_usd": total_usd } else: return None def main(): orders = [ "ORD-19 | customer: elm & pier bakery | items: cake boxes; ribbon spools | ship: 2026/04/09 | total $184.50", "ORD-07 | customer: RIVET LABS | items: torque pins | ship 2026-04-02 | urgent | total: $42", "ORD-23 | customer: Mira Fen Studio | items: vellum pads ; ink, bronze nibs | ship=04-11-2026 | total $118.00 (paid)", "ORD-11 | customer: harbor clinic| items: specimen bags | rush | ship: 2026-04-05 | total $73.9" ] # Process orders and sort by order_id result = sorted([process_order(order) for order in orders if process_order(order)], key=lambda x: int(x['order_id'].split('-')[1])) # Output JSON print(json.dumps(result, indent=4)) if __name__ == "__main__": main() ``` ### Output ```json [ { "order_id": "ORD-07", "customer": "Rivet Labs", "items": [ "torque pins" ], "rush": true, "ship_date": "2026-04-02", "total_usd": 42.0 }, { "order_id": "ORD-11", "customer": "Harbor Clinic", "items": [ "specimen bags" ], "rush": true, "ship_date": "2026-04-05", "total_usd": 73.9 }, { "order_id": "ORD-19", "customer": "Elm & Pier Bakery", "items": [ "cake boxes", "ribbon spools" ], "rush": false, "ship_date": "2026-04-09", "total_usd": 184.5 }, { "order_id": "ORD-23", "customer": "Mira Fen Studio", "items": [ "vellum pads", "ink, bronze nibs" ], "rush": false, "ship_date": "2026-04-11", "total_usd": 118.0 } ] ```
cohere-command-a: ```json [ { "order_id": "ORD-07", "customer": "Rivet Labs", "items": ["torque pins"], "rush": true, "ship_date": "2026-04-02", "total_usd": 42 }, { "order_id": "ORD-11", "customer": "Harbor Clinic", "items": ["specimen bags"], "rush": true, "ship_date": "2026-04-05", "total_usd": 73.9 }, { "order_id": "ORD-19", "customer": "Elm & Pier Bakery", "items": ["cake boxes", "ribbon spools"], "rush": false, "ship_date": "2026-04-09", "total_usd": 184.5 }, { "order_id": "ORD-23", "customer": "Mira Fen Studio", "items": ["vellum pads", "ink", "bronze nibs"], "rush": false, "ship_date": "2026-04-11", "total_usd": 118 } ] ```

OpenAI: GPT-5.6 Sol Pro: Model B is substantially closer to the required JSON-only response, though Model B incorrectly splits "ink, bronze nibs" into two items and includes a Markdown fence. Model A preserves that item correctly, but Model A seriously violates the output-format instruction by adding prose and Python code, and the supplied parser would not reliably parse the given inputs. (Second judge pass, order swapped — scores are the average of both: Model B provides the correctly normalized and sorted data with a | Anthropic: Claude Fable 5.1: Model B returns exactly what was asked—vali…

Localization with tone

Translate this app onboarding line into natural, friendly European Spanish suitable for a mobile toast (keep it under 60 characters, no exclamation marks): "You're all set — your first backup starts tonight." Return only the translation, then the character count in parentheses.

Llama-4-Scout-17B-16E-Instruct: "Todo configurado, tu primer respaldo comienza esta noche." (46)
cohere-command-a: Todo listo, tu primera copia de seguridad comienza esta noche. (58)

OpenAI: GPT-5.6 Sol Pro: Model A is better because its translation is actually 57 characters and stays under the limit, although its reported count is wrong and “respaldo” is less idiomatic in Spain. Model B is more natural European Spanish, but it is actually 62 characters, violating the length limit and also misreporting the count. (Second judge pass, order swapped — scores are the average of both: Model A wins narrowly because its translation is 57 characters without quotation marks and therefore meets the length lim | Anthropic: Claude Fable 5.1: Model A's translation is actually 57 chara…

python-timeout-bug

Debugging & code review — Python The function below is supposed to return jobs whose last heartbeat is older than `timeout_seconds`. It sometimes returns the wrong jobs around the cutoff. Find the bug, fix it, and return the corrected code only. ```python from datetime import datetime, timezone def stale_jobs(jobs, now, timeout_seconds): out = [] for job in jobs: hb = datetime.fromisoformat(job["last_heartbeat"]) age = (hb - now).seconds if age > timeout_seconds: out.append(job["id"]) return out ``` Notes: - `now` is a timezone-aware `datetime` - `job["last_heartbeat"]` is an ISO 8601 string like `2026-03-14T09:28:00+00:00` - Keep the same function signature

Llama-4-Scout-17B-16E-Instruct: ```python from datetime import datetime, timezone def stale_jobs(jobs, now, timeout_seconds): out = [] for job in jobs: hb = datetime.fromisoformat(job["last_heartbeat"]) age = (now - hb).total_seconds() # Swap order and use total_seconds() if age > timeout_seconds: out.append(job["id"]) return out ```
cohere-command-a: ```python from datetime import datetime, timezone def stale_jobs(jobs, now, timeout_seconds): out = [] for job in jobs: hb = datetime.fromisoformat(job["last_heartbeat"]).replace(tzinfo=timezone.utc) age = (now - hb).total_seconds() if age > timeout_seconds: out.append(job["id"]) return out ```

OpenAI: GPT-5.6 Sol Pro: Model A correctly reverses the subtraction and uses total_seconds() while preserving the heartbeat's parsed timezone offset. Model B fixes the age calculation but incorrectly forces every parsed timestamp to UTC with replace(), which changes the represented instant when the ISO string contains a non-UTC offset. (Second judge pass, order swapped — scores are the average of both: Model A correctly computes elapsed time as `(now - hb).total_seconds()` while preserving the ISO 8601 offset. Model B f | Anthropic: Claude Fable 5.1: Both models correctly identify the two rea…

Concurrency bug fix

This TypeScript function is meant to memoize an async loader but has a race: concurrent callers can each trigger the underlying fetch. Fix it so the fetch runs at most once per key, and a rejected fetch does NOT poison the cache (a later call must retry). Return ONLY the corrected function. ```ts const cache = new Map<string, Promise<string>>(); async function load(key: string, fetcher: (k: string) => Promise<string>) { if (cache.has(key)) return cache.get(key)!; const value = await fetcher(key); cache.set(key, Promise.resolve(value)); return value; } ```

Llama-4-Scout-17B-16E-Instruct: ```typescript const cache = new Map<string, Promise<string>>(); async function load(key: string, fetcher: (k: string) => Promise<string>) { if (cache.has(key)) return cache.get(key)!; let resolve: (value: string) => void; let reject: (error: any) => void; const promise = new Promise<string>((res, rej) => { resolve = res; reject = rej; }); cache.set(key, promise); try { const value = await fetcher(key); resolve(value); return value; } catch (error) { reject(error); cache.delete(key); // Remove rejected promise to allow retry throw error; } } ```
cohere-command-a: ```ts const cache = new Map<string, Promise<string>>(); async function load(key: string, fetcher: (k: string) => Promise<string>) { if (cache.has(key)) { const cachedPromise = cache.get(key)!; // If the cached promise is already resolved or rejected, return it // Otherwise, let the caller await the existing promise return cachedPromise; } // Create a new promise that handles the fetch and cache updates const fetchPromise = fetcher(key) .then(value => { // Only cache the resolved value if it's not already in the cache if (!cache.has(key) || cache.get(key) === fetchPromise) { cache.set(key, Promise.resolve(value)); } return value; }) .catch(error => { // Remove the promise from the cache if it rejects if (cache.get(key) === fetchPromise) { cache.delete(key); } throw error; }); // Cache the fetch promise to handle concurrent calls cache.set(key, fetchPromise); return fetchPromise; } ```

OpenAI: GPT-5.6 Sol Pro: Model B caches the in-flight promise and safely evicts it on rejection, allowing retries. Model A’s separately rejected placeholder can cause an unhandled rejection when no concurrent caller is awaiting it and may also fail strict TypeScript definite-assignment checks. (Second judge pass, order swapped — scores are the average of both: Model B correctly caches the in-flight fetch and conditionally removes it on rejection. Model A can create an unhandled rejected deferred promise when there are n | Anthropic: Claude Fable 5.1: Model B correctly caches the in-flight pro…

Unit-aware math

A pump moves 3.5 liters every 8 seconds. A tank holds 0.9 cubic meters. Starting empty, how long to fill it, in minutes and seconds (mm:ss), rounded to the nearest second? Show the key steps, then give the final answer on its own line.

Llama-4-Scout-17B-16E-Instruct: To find out how long it takes to fill the tank, we first need to know the volume of the tank in liters and the rate at which the pump moves water in liters per second. 1. Convert the tank's volume from cubic meters to liters: - 1 cubic meter = 1000 liters - 0.9 cubic meters = 0.9 * 1000 = 900 liters 2. Determine the pump's rate in liters per second: - The pump moves 3.5 liters every 8 seconds. - Rate = 3.5 liters / 8 seconds = 0.4375 liters/second 3. Calculate the time it takes to fill the tank in seconds: - Volume of the tank = 900 liters - Time = Volume / Rate = 900 liters / 0.4375 liters/second = 2057.14 seconds 4. Convert the time into minutes and seconds: - Minutes = 2057.14 / 60 = 34.2857 minutes - The decimal part of the minutes converted to seconds = 0.2857 * 60 = 17.14 seconds 5. Round to the nearest second: - 17.14 seconds rounds to 17 seconds 6. Format the time in mm:ss: - 34 minutes and 17 seconds = 34:17 34:17
cohere-command-a: To determine how long it takes to fill the tank, we need to follow these steps: 1. **Convert the tank's volume to liters:** \[ 0.9 \text{ cubic meters} = 0.9 \times 1000 \text{ liters} = 900 \text{ liters} \] 2. **Determine the pump's rate in liters per second:** \[ \text{Rate} = \frac{3.5 \text{ liters}}{8 \text{ seconds}} = 0.4375 \text{ liters/second} \] 3. **Calculate the total time required to fill the tank in seconds:** \[ \text{Time} = \frac{900 \text{ liters}}{0.4375 \text{ liters/second}} = 2057.142857 \text{ seconds} \] 4. **Convert the total time from seconds to minutes and seconds:** \[ \text{Minutes} = \left\lfloor \frac{2057.142857}{60} \right\rfloor = 34 \text{ minutes} \] \[ \text{Remaining seconds} = 2057.142857 - (34 \times 60) = 2057.142857 - 2040 = 17.142857 \text{ seconds} \] 5. **Round the remaining seconds to the nearest second:** \[ 17.142857 \approx 17 \text{ seconds} \] Thus, the time to fill the tank is: \[ \boxed{34:17} \]

OpenAI: GPT-5.6 Sol Pro: Model A and Model B both correctly convert 0.9 cubic meters to 900 liters and obtain 34:17 after rounding. Model B is slightly better because its conversion from total seconds to whole minutes and remaining seconds is more explicit and precise. (Second judge pass, order swapped — scores are the average of both: Model B and Model A both calculate the correct result and follow the requested format. Model B is marginally better because Model B retains greater numerical precision throughout and pres | Anthropic: Claude Fable 5.1: Both Model A and Model B correctly convert…

Matchup powered by OpenRouter.