Head to head: Cohere-command-a-plus-05-2026 vs Phi-4

Cohere-command-a-plus-05-2026 vs Phi-4

By · Published

RuntimeWire Head-to-Head: Head to head: Cohere-command-a-plus-05-2026 vs Phi-4
RuntimeWire Head-to-Head matchup

This matchup pits Cohere’s stronger transformation and language work against Phi-4’s cleaner showing on several implementation and format-sensitive tasks. The decisive issue is whether either model’s advantages hold consistently across repeated evaluations.

Cohere-command-a-plus-05-2026 posts the higher aggregate score, 89.0 to 82.5, and its best work is easy to identify. It more reliably sorted and normalized messy contacts, preserved the intended structure in JavaScript secret redaction, produced clearer three-part summaries, and generally delivered more natural Japanese and more faithful proofreading. Those are substantive advantages, not stylistic trivia. Phi-4 answers back where executable correctness and strict delivery matter. It was stronger on the SQL window query and Python LRU cache, and it won several TypeScript LRU, concurrency, and support-labeling comparisons. Cohere repeatedly hurt itself with stray boundary markers, Markdown fences, or code that had the right architecture but did not compile; Phi-4 was often cleaner, though its own O(n) LRU shortcuts and concurrency edge cases kept it from establishing technical dominance. The repeated tasks expose the real story: outcomes flipped on concurrency, TypeScript LRU, support labeling, localization, and unit-aware math, while both models frequently violated JSON-only, SQL-only, or code-only instructions. Even apparent Cohere strongholds such as strict extraction were often near-identical answers separated by capitalization or presentation. The 6.5-point aggregate gap is therefore descriptive, not decisive: the sample read gives only a 50% chance that either model is genuinely better. **Final call: too close to call. This is an effective tie—Cohere looks better for data cleanup and language-sensitive editing, while Phi-4 has the edge on several coding and format-discipline tasks, but neither advantage is reliable enough to crown a winner.**

Messy contacts to JSON

Convert the messy contact notes below into valid JSON only. Output an object with one key, "contacts", whose value is an array of objects sorted by last_name A-Z. Each object must have exactly these keys: first_name, last_name, company, email, phone_digits, tags. phone_digits must contain digits only. tags must be a lowercase array with duplicates removed and sorted alphabetically. Notes: - "Lina Park / Northlight Bio / [email protected] / (415) 555-0199 / tags: Investor, west-coast" - "Omar N. Haddad | Cedar & Flint | [email protected] | +1 212 555 0144 | tags: partner, urgent, Partner" - "Sofia Alvarez ; BlueHarbor Studio ; [email protected] ; 020 7946 0958 ; tags: design, eu" - "Evan Wu / Northlight Bio / [email protected] / 415.555.0112 / tags: west-coast, scientist" - "Mara Ito | Kitewell | [email protected] | 81-3-5550-4401 | tags: APAC, urgent"

Cohere-command-a-plus-05-2026: <|START_TEXT|>{ "contacts": [ { "first_name": "Sofia", "last_name": "Alvarez", "company": "BlueHarbor Studio", "email": "[email protected]", "phone_digits": "02079460958", "tags": ["design", "eu"] }, { "first_name": "Omar N.", "last_name": "Haddad", "company": "Cedar & Flint", "email": "[email protected]", "phone_digits": "12125550144", "tags": ["partner", "urgent"] }, { "first_name": "Mara", "last_name": "Ito", "company": "Kitewell", "email": "[email protected]", "phone_digits": "819355044401", "tags": ["apac", "urgent"] }, { "first_name": "Lina", "last_name": "Park", "company": "Northlight Bio", "email": "[email protected]", "phone_digits": "4155550199", "tags": ["investor", "west-coast"] }, { "first_name": "Evan", "last_name": "Wu", "company": "Northlight Bio", "email": "[email protected]", "phone_digits": "4155550112", "tags": ["scientist", "west-coast"] } ] }<|END_TEXT|>
Phi-4: ```json { "contacts": [ { "first_name": "Evan", "last_name": "Wu", "company": "Northlight Bio", "email": "[email protected]", "phone_digits": "4155550112", "tags": ["scientist", "west-coast"] }, { "first_name": "Omar N.", "last_name": "Haddad", "company": "Cedar & Flint", "email": "[email protected]", "phone_digits": "12125550144", "tags": ["partner", "urgent"] }, { "first_name": "Mara", "last_name": "Ito", "company": "Kitewell", "email": "[email protected]", "phone_digits": "3355504401", "tags": ["apac", "urgent"] }, { "first_name": "Lina", "last_name": "Park", "company": "Northlight Bio", "email": "[email protected]", "phone_digits": "4155550199", "tags": ["investor", "west-coast"] }, { "first_name": "Sofia", "last_name": "Alvarez", "company": "BlueHarbor Studio", "email": "[email protected]", "phone_digits": "207460958", "tags": ["design", "eu"] } ] } ```

OpenAI: GPT-5.6 Sol Pro: Model A correctly sorts the contacts and accurately normalizes nearly all fields, though the Mara Ito phone number is wrong and the surrounding marker tokens prevent the response from being valid JSON only. Model B uses the wrong sort order, incorrectly transforms multiple phone numbers, and wraps the JSON in a Markdown fence. (Second judge pass, order swapped — scores are the average of both: Model A correctly sorts the contacts and preserves Sofia’s leading phone digit, though Mara’s phone num | Anthropic: Claude Fable 5.1: Model A correctly sorts contacts by last_n…

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.

Cohere-command-a-plus-05-2026: <|START_TEXT|>```ts class LRUCache<K, V> { type Node = { key: K; value: V; prev: Node | null; next: Node | null }; private capacity: number; private map: Map<K, Node>; private head: Node | null; private tail: Node | null; constructor(capacity: number) { this.capacity = Math.max(0, capacity); this.map = new Map(); this.head = null; this.tail = null; } get(key: K): V | undefined { const node = this.map.get(key); if (!node) return undefined; this._moveToHead(node); return node.value; } set(key: K, value: V): void { if (this.capacity === 0) return; let node = this.map.get(key); if (node) { node.value = value; this._moveToHead(node); } else { node = { key, value, prev: null, next: null }; this.map.set(key, node); this._addToHead(node); if (this.map.size > this.capacity) { const old = this._popTail(); if (old) this.map.delete(old.key); } } } private _removeNode(node: Node): void { if (node.prev) node.prev.next = node.next; else this.head = node.next; if (node.next) node.next.prev = node.prev; else this.tail = node.prev; node.prev = node.next = null; } private _addToHead(node: Node): void { node.next = this.head; node.prev = null; if (this.head) this.head.prev = node; this.head = node; if (!this.tail) this.tail = node; } private _moveToHead(node: Node): void { this._removeNode(node); this._addToHead(node); } private _popTail(): Node | null { if (!this.tail) return null; const node = this.tail; this._removeNode(node); return node; } } ```<|END_TEXT|>
Phi-4: ```typescript class LRUCache<K, V> { private capacity: number; private cache: Map<K, V>; private order: K[]; constructor(capacity: number) { this.capacity = capacity; this.cache = new Map<K, V>(); this.order = []; } get(key: K): V | undefined { if (this.cache.has(key)) { this.order = this.order.filter(k => k !== key); // Remove the key to update its position this.order.push(key); // Place it at the end (most recent) return this.cache.get(key); } return undefined; } set(key: K, value: V): void { if (this.cache.has(key)) { this.cache.set(key, value); this.order = this.order.filter(k => k !== key); // Remove the key to update its position } else { if (this.cache.size >= this.capacity) { const lru = this.order.shift(); // Remove the least recently used key if (lru !== undefined) { this.cache.delete(lru); } } } this.cache.set(key, value); this.order.push(key); // Add key as most recently used } } ```

OpenAI: GPT-5.6 Sol Pro: Model A has the intended O(1) data structure but is invalid TypeScript because a type alias cannot be declared directly inside a class. Model B compiles and mostly implements LRU behavior, but violates the O(1) requirement and mishandles zero capacity and certain key values. (Second judge pass, order swapped — scores are the average of both: Model B is valid TypeScript and mostly implements LRU behavior, but array filtering and shifting violate the O(1) requirement and edge cases such as zero ca | Anthropic: Claude Fable 5.1: Model A implements the proper Map + doubly…

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."

Cohere-command-a-plus-05-2026: ```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} ] ```
Phi-4: ```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 A and Model B extract all meetings and calculate the times correctly, but Model A uses cleaner, consistently title-cased day values; Model A and Model B both violate the strict JSON-only requirement by wrapping the array in Markdown fences. (Second judge pass, order swapped — scores are the average of both: Model B and Model A extract all meetings and compute the times and durations correctly; capitalization of the day values is unspecified. Model B and Model A violate the strict requireme | Anthropic: Claude Fable 5.1: Model A and Model B extract identical, cor…

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; } ```

Cohere-command-a-plus-05-2026: <|START_TEXT|>```ts async function load(key: string, fetcher: (k: string) => Promise<string>) { // If there's already a cached promise (pending or resolved), return it. if (cache.has(key)) { return cache.get(key)!; } // Create a pending promise that will be resolved/rejected by the fetch. let resolve: (value: string) => void; let reject: (reason?: unknown) => void; const pending = new Promise<string>((res, rej) => { resolve = res; reject = rej; }); // Store the pending promise to block concurrent callers. cache.set(key, pending); try { const value = await fetcher(key); // Resolve the pending promise so waiting callers receive the result. resolve(value); // Replace the pending placeholder with a resolved promise for future lookups. cache.set(key, Promise.resolve(value)); return value; } catch (error) { // Reject the pending promise so waiting callers see the failure. reject(error); // Delete the entry so later calls will retry the fetch. cache.delete(key); throw error; } } ```<|END_TEXT|>
Phi-4: To fix the race condition and ensure that a rejected fetch does not poison the cache, you can modify the function to store a promise of a new promise while waiting for the result. This ensures that all concurrent requests for the same key share the same promise and retry in case of rejection. Here's the corrected function: ```ts const cache = new Map<string, Promise<string>>(); async function load(key: string, fetcher: (k: string) => Promise<string>): Promise<string> { if (cache.has(key)) { return cache.get(key)!; } const fetchingPromise = (async () => { try { const value = await fetcher(key); cache.set(key, Promise.resolve(value)); return value; } catch (error) { cache.delete(key); throw error; } })(); cache.set(key, fetchingPromise); return fetchingPromise; } ``` ### Key Changes: 1. **Store a promise of a new promise**: When a key is not in the cache, store the promise of the async function that fetches the data. This ensures all concurrent calls for the same key await the same promise. 2. **Delete the cache on rejection**: If the fetch fails, delete the key from the cache. This ensures that future calls will retry the fetch instead of failing with the cached error. These changes ensure that the fetch runs at most once per key and that a failed fetch does not prevent future retries.

OpenAI: GPT-5.6 Sol Pro: Model A follows the explicit output-only requirement and correctly shares an in-flight fetch and clears failures, though its manually rejected placeholder can cause an unhandled rejection when there are no waiting callers. Model B is simpler and correct for ordinary promise rejections, but violates the required format and can leave a rejected promise cached if the fetcher throws synchronously. (Second judge pass, order swapped — scores are the average of both: Model A follows the requested outpu | Anthropic: Claude Fable 5.1: Model B's IIFE-based fix is correct and id…

Support ticket labeling

Classify each support ticket into exactly one category: Billing, Bug, Feature Request, Account Access, or Shipping. For each, give a 1-sentence justification. Return exactly 6 lines in this format: ID | Category | Justification T1: "I was charged twice for order QN-1842 after the page froze." T2: "The app logs me out every time I attach a PDF from my phone." T3: "Please add dark mode to the clinician portal before night shift starts next month." T4: "My reset link says expired the moment I open it, and I still can't sign in." T5: "Tracking for carton 77-KL says delivered, but our reception desk never got it." T6: "The invoice shows 14 seats, but we only renewed 11 after Priya and Mateo left."

Cohere-command-a-plus-05-2026: <|START_TEXT|>T1 | Billing | The customer reports being charged twice for order QN-1842. T2 | Bug | The app logs the user out whenever a PDF is attached from their phone. T3 | Feature Request | The user requests adding dark mode to the clinician portal before the upcoming night shift. T4 | Account Access | The password reset link expires immediately upon opening, preventing the user from signing in. T5 | Shipping | Tracking shows carton 77-KL as delivered, but the reception desk never received the package. T6 | Billing | The invoice lists 14 seats while only 11 were renewed after two employees left.<|END_TEXT|>
Phi-4: T1 | Billing | This ticket involves a double charge which is a billing issue. T2 | Bug | The problem of being logged out during a PDF attachment indicates a software malfunction. T3 | Feature Request | Requesting dark mode in a portal is a request for a new feature. T4 | Account Access | Difficulty in signing in and expired reset links relate to account access issues. T5 | Shipping | This relates to delivery status reporting, indicating a shipping issue. T6 | Billing | The discrepancy between seats renewed and those shown on the invoice involves billing.

OpenAI: GPT-5.6 Sol Pro: Model A classifies and justifies all tickets correctly, but the extraneous start and end markers violate the required line format. Model B is fully correct, concise, and adheres exactly to the requested output structure. (Second judge pass, order swapped — scores are the average of both: Model B provides all six correct classifications in the exact requested format. Model A is substantively correct and well written, but the extraneous start and end markers violate the strict formatting requireme | Anthropic: Claude Fable 5.1: Both outputs classify all six tickets iden…

SQL window query

Given Postgres tables `orders(id, customer_id, created_at, total_cents)` and `customers(id, name)`, write ONE SQL query returning each customer's name and their SECOND-largest order total (in dollars, 2 decimals), excluding customers with fewer than two orders. Order by that value descending. Return ONLY the SQL.

Cohere-command-a-plus-05-2026: <|START_TEXT|>```sql WITH ranked_orders AS ( SELECT customer_id, total_cents, ROW_NUMBER() OVER (PARTITION BY customer_id ORDER BY total_cents DESC) as rank FROM orders ) SELECT c.name, ROUND(CAST(r.total_cents / 100.0 AS NUMERIC), 2) as second_largest_total FROM customers c JOIN ranked_orders r ON c.id = r.customer_id AND r.rank = 2 ORDER BY r.total_cents DESC; ```<|END_TEXT|>
Phi-4: ```sql WITH customer_orders AS ( SELECT c.id AS customer_id, c.name AS customer_name, o.total_cents, ROW_NUMBER() OVER (PARTITION BY c.id ORDER BY o.total_cents DESC) AS rn FROM customers c JOIN orders o ON c.id = o.customer_id ), customer_order_counts AS ( SELECT customer_id, COUNT(*) AS order_count FROM orders GROUP BY customer_id HAVING COUNT(*) >= 2 ) SELECT co.customer_name, ROUND(co.total_cents / 100.0::numeric, 2) AS second_largest_order FROM customer_orders co JOIN customer_order_counts coc ON co.customer_id = coc.customer_id WHERE co.rn = 2 ORDER BY second_largest_order DESC; ```

OpenAI: GPT-5.6 Sol Pro: Model B correctly computes the second order by total and excludes customers with fewer than two orders, though its counting CTE is redundant. Model A is also logically correct and more concise, but its extra sentinel text compounds the code-fence violation of the requirement to return only SQL. (Second judge pass, order swapped — scores are the average of both: Model B and Model A are both logically correct, with the second-ranked row inherently excluding customers with fewer than two orders. Mo | Anthropic: Claude Fable 5.1: Both queries are logically correct (ROW_NU…

JS log redaction utility

JavaScript. Write a function redactLog(line) that replaces sensitive values in application log lines while preserving the rest of the text. Redact: - email addresses -> [EMAIL] - IPv4 addresses -> [IP] - values of tokens in patterns token=..., api_key=..., or password=... up to the next whitespace or semicolon -> [SECRET] The function must leave punctuation and spacing otherwise unchanged. Then export it with module.exports = { redactLog }. Return code only.

Cohere-command-a-plus-05-2026: <|START_TEXT|>```javascript module.exports = { redactLog: function(line) { // Redact token values (token=, api_key=, password=) up to whitespace or semicolon line = line.replace(/(token|api_key|password)=([^;\s]*)/gi, '$1=[SECRET]'); // Redact email addresses line = line.replace(/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/gi, '[EMAIL]'); // Redact IPv4 addresses (valid octets 0-255) line = line.replace( /(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]?\d)){3}/g, '[IP]' ); return line; } }; ```<|END_TEXT|>
Phi-4: ```javascript function redactLog(line) { const emailRegex = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z]{2,}\b/gi; const ipv4Regex = /\b(?:\d{1,3}\.){3}\d{1,3}\b/g; const tokenRegex = /\b(?:token=|api_key=|password=)[^;\s]+/g; // Redact email addresses line = line.replace(emailRegex, '[EMAIL]'); // Redact IPv4 addresses line = line.replace(ipv4Regex, (match) => { const parts = match.split('.'); if (parts.length === 4 && parts.every(part => part >= 0 && part <= 255)) { return '[IP]'; } return match; }); // Redact tokens line = line.replace(tokenRegex, '[SECRET]'); return line; } module.exports = { redactLog }; ```

OpenAI: GPT-5.6 Sol Pro: Model A correctly replaces only each sensitive value, preserving the key and equals sign, whereas Model B replaces the entire token=..., api_key=..., or password=... expression. Model A has an IPv4 boundary weakness and extra non-code wrapper text, while Model B also violates the code-only requirement with Markdown fencing. (Second judge pass, order swapped — scores are the average of both: Model A correctly preserves the token field name and equals sign while replacing only its value, whereas M | Anthropic: Claude Fable 5.1: Model A correctly replaces only the value…

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.

Cohere-command-a-plus-05-2026: To determine how long it takes to fill the tank, we need to follow these steps: 1. **Convert the tank volume from cubic meters 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 (seconds)} = \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} \]
Phi-4: To determine how long it takes to fill the tank, we need to perform the following steps: 1. **Convert the tank's volume from cubic meters to liters**: Since 1 cubic meter is equivalent to 1000 liters, the volume of the tank in liters is: \[ 0.9 \, \text{cubic meters} \times 1000 \, \text{liters/cubic meter} = 900 \, \text{liters} \] 2. **Determine the pump's rate in liters per second**: The pump moves 3.5 liters every 8 seconds. Therefore, the pumping rate in liters per second is: \[ \frac{3.5 \, \text{liters}}{8 \, \text{seconds}} = 0.4375 \, \text{liters/second} \] 3. **Calculate the time required to fill the tank**: Given the rate of 0.4375 liters per second, the time \( t \) in seconds required to fill 900 liters is: \[ t = \frac{900 \, \text{liters}}{0.4375 \, \text{liters/second}} \approx 2057.14 \, \text{seconds} \] 4. **Convert the time from seconds to minutes and seconds**: To convert 2057.14 seconds into minutes and seconds, divide by 60: \[ \text{minutes} = \left\lfloor \frac{2057.14}{60} \right\rfloor = 34 \, \text{minutes} \] \[ \text{remaining seconds} = 2057.14 - (34 \times 60) = 2057.14 - 2040 = 17.14 \approx 17 \, \text{seconds} \] Thus, the total time to fill the tank is approximately 34 minutes and 17 seconds. Final answer: 34:17

OpenAI: GPT-5.6 Sol Pro: Model A and Model B both correctly convert 0.9 cubic meters to 900 liters, compute the fill time as about 2057.14 seconds, and round the converted result to 34:17. Both clearly show the key steps and place the final mm:ss answer on its own line. (Second judge pass, order swapped — scores are the average of both: Model B and Model A both correctly convert 0.9 m³ to 900 L, compute 2057.14 seconds, round to 34:17, and present clear key steps with the final result on its own line.) | Anthropic: Claude Fable 5.1: Model A and Model B both convert 0.9 m³ to 900 L, compute th…

Summarize dense passage

Summarize the passage below in exactly three bullet points, each one sentence, capturing the mechanism, the tradeoff, and the caveat — no jargon a non-specialist couldn't follow. Return only the bullets. Passage: "Speculative decoding pairs a small draft model with a large target model: the draft proposes several tokens, the target verifies them in one pass, and accepted tokens are kept while the first rejection resets to the target's own choice. This can cut latency substantially when acceptance is high, but the draft model's compute is pure overhead when acceptance is low, and gains evaporate on adversarial or highly novel inputs where the draft and target disagree often."

Cohere-command-a-plus-05-2026: * **Mechanism**: A smaller model suggests multiple text pieces, which a larger model quickly checks and either accepts or rejects in one go. * **Tradeoff**: Speeds up processing when the smaller model’s suggestions are often correct, but slows it down if they’re frequently wrong. * **Caveat**: Works poorly with tricky or unfamiliar content where the two models often disagree.
Phi-4: - In speculative decoding, a small draft model suggests several tokens, which a larger target model then checks in one go; tokens the target agrees with are kept, but if rejected, the process reverts to the target's own choice. - This method can significantly reduce delays in decoding ("latency") when the target model frequently agrees with the draft model's suggestions, but becomes wasteful when the draft's suggestions are rarely approved. - The system is less efficient when dealing with unfamiliar or deceptive inputs that commonly cause disagreements between the draft and target models, negating potential benefits.

OpenAI: GPT-5.6 Sol Pro: Model A follows the plain-language requirement more closely while clearly separating the mechanism, tradeoff, and caveat into exactly three one-sentence bullets. Model B is slightly more complete about what happens after rejection, but it retains specialist terms such as “tokens,” “decoding,” and “latency.” (Second judge pass, order swapped — scores are the average of both: Model A follows the requested three-part structure and uses clearer, non-specialist language. Model B is slightly more prec | Anthropic: Claude Fable 5.1: Model A delivers three crisp one-sentence…

Localized apology to Japanese

Translate this message into natural Japanese for a customer support email. Tone: polite, warm, and professional. Keep it to 2 sentences total, and preserve the apology plus the concrete next step. "I'm sorry your replacement grinder lid still hasn't arrived. I've asked our warehouse to trace parcel BX-417 and we'll email you an update by tomorrow afternoon."

Cohere-command-a-plus-05-2026: <|START_TEXT|>交換用グラインダーの蓋がお手元に届いていないとのこと、誠に申し訳ございません。在庫管理チームにBX-417便の追跡を依頼し、明日の午後までに進捗をメールでご連絡いたします。<|END_TEXT|>
Phi-4: 交換のグラインダーリッドがまだお手元に届いていないことをお詫び申し上げます。既に弊社倉庫に「BX-417」の荷物の追跡を依頼しましたので、明日午後までにご連絡先に更新のメールをお送りいたします。

OpenAI: GPT-5.6 Sol Pro: Model A is substantially more natural and polished in Japanese, although the extraneous boundary tokens and the substitution of 「在庫管理チーム」 for the warehouse are minor flaws. Model B preserves the warehouse reference and follows the two-sentence limit, but phrases such as 「交換のグラインダーリッド」 and 「ご連絡先に更新のメール」 sound awkward and translated. (Second judge pass, order swapped — scores are the average of both: Model B more faithfully preserves the warehouse, parcel number, apology, and deadline while comply | Anthropic: Claude Fable 5.1: Model A reads as genuinely natural, warm c…

LRU cache in Python

Implement an LRUCache class in Python with O(1) average get and put using a hash map plus doubly linked list. Methods: __init__(capacity:int), get(key:int)->int returning -1 if missing, and put(key:int,value:int)->None. If capacity is exceeded, evict the least recently used item. Assume capacity >= 1. Return code only.

Cohere-command-a-plus-05-2026: ```python from typing import Optional, Dict class Node: def __init__(self, key: int, value: int): self.key = key self.value = value self.prev: Optional[Node] = None self.next: Optional[Node] = None class LRUCache: def __init__(self, capacity: int): self.capacity = capacity self.cache: Dict[int, Node] = {} # Dummy head and tail for easier removal/addition self.head = Node(0, 0) self.tail = Node(0, 0) self.head.next = self.tail self.tail.prev = self.head def _remove(self, node: Node) -> None: """Remove node from doubly linked list""" prev = node.prev nxt = node.next if prev and nxt: prev.next = nxt nxt.prev = prev def _add(self, node: Node) -> None: """Add node right after head""" node.prev = self.head node.next = self.head.next self.head.next.prev = node self.head.next = node def get(self, key: int) -> int: if key in self.cache: node = self.cache[key] self._remove(node) self._add(node) return node.value return -1 def put(self, key: int, value: int) -> None: if key in self.cache: self._remove(self.cache[key]) node = Node(key, value) self._add(node) self.cache[key] = node if len(self.cache) > self.capacity: # Remove from the cache and linked list lru = self.tail.prev if lru: self._remove(lru) del self.cache[lru.key] ```
Phi-4: ```python class Node: def __init__(self, key: int, value: int): self.key = key self.value = value self.prev = None self.next = None class LRUCache: def __init__(self, capacity: int): self.capacity = capacity self.cache = {} # Using a doubly linked list to keep track of LRU order self.head = Node(0, 0) self.tail = Node(0, 0) self.head.next = self.tail self.tail.prev = self.head def _remove(self, node: Node): prev = node.prev nxt = node.next prev.next = nxt nxt.prev = prev def _add(self, node: Node): prev = self.tail.prev prev.next = node self.tail.prev = node node.prev = prev node.next = self.tail def get(self, key: int) -> int: if key in self.cache: node = self.cache[key] self._remove(node) self._add(node) return node.value return -1 def put(self, key: int, value: int) -> None: if key in self.cache: self._remove(self.cache[key]) node = Node(key, value) self._add(node) self.cache[key] = node if len(self.cache) > self.capacity: # Remove LRU from the list and delete it from hash map lru = self.head.next self._remove(lru) del self.cache[lru.key] ```

OpenAI: GPT-5.6 Sol Pro: Model A and Model B both correctly combine a hash map with a doubly linked list, update recency on get and put, and evict the least recently used entry in O(1) average time. Both slightly miss the strict “code only” requirement by wrapping the code in Markdown fences. (Second judge pass, order swapped — scores are the average of both: Model B and Model A are both functionally correct and achieve O(1) average operations. Model B is slightly better because it is more concise and relies cleanly on | Anthropic: Claude Fable 5.1: Both Model A and Model B implement a correc…

Proofread staff update

Rewrite the passage to fix grammar, punctuation, and clarity without changing meaning or tone. Then list up to 4 brief bullet points describing the edits. Keep names, dates, and all factual content unchanged. Passage: "Hi team, yesterdays client workshop in Denver went better then expected, but there was a few follow-ups we shouldnt let slip. First, Acero Health want the revised onboarding deck by Friday, including the slide on regional staffing which Jenna and me still need to finish. Second the pilot dashboard numbers in section 4 are correct, however the caption under figure 2 mention March when it should say May. Lastly, if anyone has notes from the hallway chat with Dr. Beltran send it to Amir or I before 3 pm because we're drafting the recap tonight."

Cohere-command-a-plus-05-2026: **Revised Passage:** "Hi team, yesterday’s client workshop in Denver went better than expected, but there are a few follow-ups we shouldn’t let slip. First, Acero Health wants the revised onboarding deck by Friday, including the slide on regional staffing, which Jenna and I still need to finish. Second, the pilot dashboard numbers in section 4 are correct; however, the caption under figure 2 mentions March when it should say May. Lastly, if anyone has notes from the hallway chat with Dr. Beltran, send them to Amir or me before 3 p.m., as we’re drafting the recap tonight." **Edits:** - Corrected "yesterdays" to "yesterday’s" for proper possessive form. - Changed "better then expected" to "better than expected" for correct comparison. - Fixed "a few follow-ups" to "there are a few follow-ups" for grammatical clarity. - Replaced "want" with "wants" to agree with the singular subject "Acero Health." - Corrected "Jenna and me" to "Jenna and I" for proper subject pronoun usage. - Added a semicolon and adjusted punctuation in the second sentence for clarity. - Changed "mention" to "mentions" for subject-verb agreement. - Replaced "send it" with "send them" to match the plural "notes." - Corrected "Amir or I" to "Amir or me" for proper object pronoun usage. - Added "as" for smoother sentence flow in the final instruction. **Key Bullet Points:** - Fixed possessive forms (e.g., "yesterday’s"). - Corrected comparison errors ("than" instead of "then"). - Improved subject-verb agreement (e.g., "wants," "mentions"). - Adjusted pronoun cases (e.g., "Jenna and I," "Amir or me").
Phi-4: **Revised Passage:** "Hi team, Yesterday's client workshop in Denver went better than expected, but there are a few follow-ups we shouldn't let slip. First, Acero Health wants the revised onboarding deck by Friday, including the slide on regional staffing which Jenna and I still need to finish. Second, the pilot dashboard numbers in section 4 are correct; however, the caption under figure 2 mentions March when it should say May. Lastly, if anyone has notes from the hallway chat with Dr. Beltran, please send them to Amir or me before 3 PM because we're drafting the recap tonight." **Edits:** - Corrected "yesterdays" to "Yesterday's" and "then" to "than" to fix tense and comparison issues. - Changed "few follow-ups we shouldn't let slip" to "a few follow-ups we shouldn't let slip" for clarity and grammatical correctness. - Replaced "Jenna and me" with "Jenna and I" for proper pronoun usage. - Revised the sentence about the dashboard numbers for clarity and correctness in structure. - Split the final sentence into two for improved readability, specifying "before 3 PM" for clarity with the time format.

OpenAI: GPT-5.6 Sol Pro: Model B provides a clean, accurate revision and comes closer to the requested format, although it includes five bullets, adds “please,” and inaccurately claims to have split the final sentence. Model A’s revision is slightly more precise and its edit descriptions are accurate, but the redundant fourteen total bullets substantially violate the limit of four. (Second judge pass, order swapped — scores are the average of both: Model B provides a clear, accurate revision and stays closer to the requ | Anthropic: Claude Fable 5.1: Both rewrites are grammatically sound, but…

Matchup powered by OpenRouter.