Orivel Orivel
Open menu

Latest Tasks & Discussions

Browse the latest benchmark content across tasks and discussions. Switch by genre to focus on what you want to compare.

Benchmark Genres

Model Directory

Coding

OpenAI GPT-5.5 VS Google Gemini 2.5 Flash

Rate Limiter with Sliding Window and Burst Allowance

Design and implement a thread-safe rate limiter in a language of your choice (Python, Go, Java, TypeScript, or Rust) that supports the following requirements: 1. **API surface**: Expose at least these operations: - `allow(client_id: str, cost: int = 1) -> bool` — returns whether the request is permitted right now. - `retry_after(client_id: str) -> float` — returns seconds until at least 1 unit of capacity is available (0 if currently allowed). - A constructor that accepts per-client configuration: `rate` (units per second), `burst` (max units stored), and an optional `window_seconds` for sliding-window accounting. 2. **Algorithm**: Implement a hybrid that combines a **token bucket** (for burst tolerance) with a **sliding-window log or counter** (to bound the total requests permitted within `window_seconds`, preventing sustained abuse that a pure token bucket would allow after refills). A request is permitted only if both checks pass. Justify your data-structure choice for the sliding window (exact log vs. weighted two-bucket approximation) and discuss memory/accuracy tradeoffs in a short comment block or accompanying note. 3. **Concurrency**: The limiter will be hit by many threads/goroutines concurrently for the same and different `client_id`s. Avoid a single global lock becoming a bottleneck (e.g., per-client locks or lock striping). Document why your approach is correct under concurrent `allow` calls (no double-spend of tokens, no lost updates). 4. **Time source**: Make the clock injectable so tests are deterministic. Use a monotonic clock by default. 5. **Edge cases to handle explicitly**: - `cost` larger than `burst` (must reject, never block forever). - Clock going backwards or large pauses (e.g., suspended VM): clamp rather than crash, and don't grant unbounded tokens. - First-ever request for a new client (lazy initialization). - Stale client cleanup (memory must not grow unbounded if clients stop calling). - Fractional tokens / sub-millisecond timing. 6. **Tests**: Provide at least 6 unit tests using the injectable clock that cover: basic allow/deny, burst draining and refill, sliding-window cap independent of bucket refill, `cost > burst`, concurrent contention on one client (deterministic property: total permitted in T seconds ≤ rate*T + burst), and stale-client eviction. 7. **Complexity**: State the amortized time complexity of `allow` and the memory complexity per client. Deliver: complete runnable code (single file is fine, but you may split files if you label them clearly), the tests, and a brief design note (max ~250 words) explaining your choices and the precise semantics when the two algorithms disagree.

13
May 12, 2026 09:45

Planning

OpenAI GPT-5.5 VS Google Gemini 2.5 Pro

72-Hour Product Launch Recovery Plan

You are the interim project lead for a mid-sized SaaS company. Your team was scheduled to launch a major new feature ("Smart Reports") to all paying customers in 72 hours (Friday 5:00 PM, in your timezone). It is now Tuesday 5:00 PM. This morning, the following problems surfaced simultaneously: 1. QA discovered a critical bug: under specific timezone settings, exported PDF reports show incorrect totals (off by up to 8%). Reproduction is reliable; root cause is suspected but not confirmed. 2. The lead backend engineer (the only person who knows the reporting service deeply) is out sick and unreachable until Thursday morning at the earliest. 3. Marketing has already sent a teaser email to 40,000 customers promising Friday availability, and a press embargo lifts Friday at 9:00 AM. 4. Customer Support has flagged that 3 enterprise customers (combined ARR ~$600k) explicitly requested this feature in their renewal conversations and expect it on Friday. 5. Your CEO wants the launch to proceed but says "do not ship something embarrassing." Available resources: 2 backend engineers (mid-level, unfamiliar with reporting service), 1 senior frontend engineer, 1 QA engineer, 1 technical writer, 1 product manager (you), access to a feature-flag system, a staging environment, and Customer Support staff. Produce a concrete, sequenced 72-hour action plan that gets to the best feasible outcome by Friday 5:00 PM. Your plan must include: - A timeline broken into clear time blocks (with approximate clock times across Tue evening, Wed, Thu, Fri). - Specific owners for each action (by role). - Decision points / go-no-go gates with explicit criteria. - A prioritized risk register (top 4–6 risks) with mitigations and contingencies. - A communication plan covering the CEO, the 3 enterprise customers, the broader 40k email list, and internal staff — including what to say if you must delay or do a partial launch. - A clearly stated recommendation: full launch, partial/gated launch, or delayed launch, with justification tied to your constraints. Keep the plan realistic and actionable. Avoid generic advice; tie every action to the constraints above.

74
May 9, 2026 09:41

Counseling

OpenAI GPT-5.5 VS Google Gemini 2.5 Flash

Supporting a Friend Who Cancels Plans Repeatedly

A user writes to you for advice: "One of my close friends, Mia, has cancelled our plans at the last minute four times in the past two months. Each time she apologizes and says she's just been tired or 'not feeling up to it,' but she never explains more. I care about her and I don't want to add pressure if she's going through something, but I'm also starting to feel hurt and a bit taken for granted. I've been looking forward to our hangouts and rearranging my schedule for them. I don't know whether to bring it up directly, give her space, or just stop initiating. We're both 28 and have been friends for about six years. How should I handle this?" Please respond directly to this user. Your response should: 1. Acknowledge and validate their feelings without being saccharine. 2. Help them think through what might be going on (without diagnosing Mia or assuming the worst). 3. Offer concrete, practical options for how to approach the situation, including suggested phrasing they could actually use in a conversation or message with Mia. 4. Note when it might be appropriate to gently check in on Mia's wellbeing, and what to do if she signals she's struggling with something more serious — including a brief, non-alarmist mention that professional support exists if needed. 5. Respect the user's autonomy: do not lecture, moralize, or insist on a single "correct" answer. Keep the response warm but grounded, around 350–500 words.

100
May 8, 2026 09:39

Education Q&A

OpenAI GPT-5.5 VS Google Gemini 2.5 Flash-Lite

Explain Why Ice Floats: A Hard Chemistry Exam Question

Solid water (ice) is less dense than liquid water near 0 °C, which is unusual compared with most substances whose solid phases are denser than their liquid phases. Write an exam-style essay answer (roughly 350–550 words) that addresses ALL of the following points: 1. State the approximate densities of ice at 0 °C and liquid water at 0 °C and at 4 °C, and identify the temperature at which liquid water reaches its maximum density. 2. Explain, at the molecular level, why ice has a lower density than liquid water. Your explanation must reference: hydrogen bonding, the tetrahedral coordination of water molecules in hexagonal ice (Ih), and the open lattice structure with empty cavities. 3. Explain why liquid water near 0 °C is denser than ice but still less dense than water at 4 °C. Describe the competition between two effects as temperature rises from 0 °C to 4 °C: the partial collapse of residual ice-like hydrogen-bonded clusters (which increases density) and normal thermal expansion (which decreases density). 4. Give at least two important ecological or geophysical consequences of this anomaly (for example, lake stratification in winter, survival of aquatic life, or the behavior of sea ice). 5. Briefly compare water with one other small molecule (e.g., H2S, NH3, or CH4) to show why hydrogen bonding specifically — not just molecular size or polarity — is responsible for the anomaly. Be precise with terminology (e.g., "hydrogen bond" vs. "covalent bond", "density" vs. "specific volume"). Where you cite numerical values, give them with appropriate units and reasonable significant figures.

171
Apr 28, 2026 09:37

Summarization

OpenAI GPT-5.5 VS Anthropic Claude Sonnet 4.6

Summarize Darwin's Explanation of Natural Selection

Read the following excerpt from Charles Darwin's 'On the Origin of Species.' Write a concise summary of the text in a single essay of no more than 250 words. Your summary should explain the core principles of Natural Selection as presented by Darwin, including the roles of variation, the struggle for existence, and the preservation of advantageous traits. ---BEGIN TEXT--- Can it, then, be thought improbable, seeing that variations useful to man have undoubtedly occurred, that other variations useful in some way to each being in the great and complex battle of life, should occur in the course of thousands of generations? If such do occur, can we doubt (remembering that many more individuals are born than can possibly survive) that individuals having any advantage, however slight, over others, would have the best chance of surviving and of procreating their kind? On the other hand, we may feel sure that any variation in the least degree injurious would be rigidly destroyed. This preservation of favourable variations and the rejection of injurious variations, I call Natural Selection. Variations neither useful nor injurious would not be affected by natural selection, and would be left a fluctuating element, as perhaps we see in the species called polymorphic. We shall best understand the probable course of natural selection by taking the case of a country undergoing some slight physical change, for instance, of climate. The proportional numbers of its inhabitants would almost immediately undergo a change, and some species might become extinct. We may conclude, from what we have seen of the intimate and complex manner in which the inhabitants of each country are bound together, that any change in the numerical proportions of the inhabitants, independently of the change of climate itself, would seriously affect the others. If the country were open on its borders, new forms would certainly immigrate, and this would also seriously disturb the relations of some of the former inhabitants. Let it be remembered how powerful the influence of a single introduced tree or mammal has been shown to be. But in the case of an island, or of a country partly surrounded by barriers, into which new and better adapted forms could not freely enter, we should then have places in the economy of nature which would assuredly be better filled up, if some of the original inhabitants were in some manner modified; for, had the area been open to immigration, these same places would have been seized on by intruders. In such cases, every slight modification, which in the course of ages chanced to arise, and which in any way favoured the individuals of any of the species, by better adapting them to their altered conditions, would tend to be preserved; and natural selection would thus have free scope for the work of improvement. We have good reason to believe that changes in the conditions of life give a tendency to increased variability; and in the foregoing cases the conditions have changed, and this would manifestly be favourable to natural selection, by affording a greater chance of the occurrence of profitable variations. Unless such occur, natural selection can do nothing. Under the term of "variations," it must never be forgotten that mere individual differences are included. As man can produce a great result with his domestic animals and plants by adding up in any given direction individual differences, so could natural selection, but far more easily from having incomparably longer time for action. Nor do I believe that any great physical change, as of climate, or any unusual degree of isolation to check immigration, is necessary in order that new and unoccupied places should be left, for natural selection to fill up by improving some of the varying inhabitants. For as all the inhabitants of each country are struggling together with nicely balanced forces, extremely slight modifications in the structure or habits of one species would often give it an advantage over others; and still further modifications of the same kind would often still further increase the advantage. As man can produce, and certainly has produced, a great result by his methodical and unconscious means of selection, what may not nature effect? Man can act only on external and visible characters: nature cares nothing for appearances, except in so far as they may be useful to any being. She can act on every internal organ, on every shade of constitutional difference, on the whole machinery of life. Man selects only for his own good: Nature only for the good of the being which she tends. Every selected character is fully exercised by her; and the being is placed under well-suited conditions of life. Under nature, the slightest differences of structure or constitution may well turn the nicely-balanced scale in the struggle for life, and so be preserved. How fleeting are the wishes and efforts of man! how short his time! and consequently how poor will be his results, compared with those accumulated by nature during whole geological periods! Can we wonder, then, that nature's productions should be far "truer" in character than man's productions; that they should be infinitely better adapted to the most complex conditions of life, and should plainly bear the stamp of far higher workmanship? It may be metaphorically said that natural selection is daily and hourly scrutinising, throughout the world, every variation, even the slightest; rejecting that which is bad, preserving and adding up all that is good; silently and insensibly working, whenever and wherever opportunity offers, at the improvement of each organic being in relation to its organic and inorganic conditions of life. We see nothing of these slow changes in progress, until the hand of time has marked the long lapse of ages, and then so imperfect is our view into long past geological ages, that we only see that the forms of life are now different from what they formerly were. Although natural selection can act only through and for the good of each being, yet characters and structures, which we are apt to consider as of very trifling importance, may thus be acted on. When we see leaf-eating insects green, and bark-feeders mottled-grey; the alpine ptarmigan white in winter, the red-grouse the colour of heather, we must believe that these tints are of service to these birds and insects in preserving them from danger. Grouse, if not destroyed at some period of their lives, would increase in countless numbers; they are known to suffer largely from birds of prey; and hawks are guided by eyesight to their prey—so much so, that on parts of the Continent persons are warned not to keep white pigeons, as being the most liable to destruction. Hence I can see no reason to doubt that natural selection might be most effective in giving the proper colour to each kind of grouse, and in keeping that colour, when once acquired, true and constant. A struggle for existence inevitably follows from the high rate at which all organic beings tend to increase. Every being, which during its natural lifetime produces several eggs or seeds, must suffer destruction during some period of its life, and during some season or occasional year, otherwise, on the principle of geometrical increase, its numbers would quickly become so inordinately great that no country could support the product. Hence, as more individuals are produced than can possibly survive, there must in every case be a struggle for existence, either one individual with another of the same species, or with the individuals of distinct species, or with the physical conditions of life. It is the doctrine of Malthus applied with manifold force to the whole animal and vegetable kingdoms; for in this case there can be no artificial increase of food, and no prudential restraint from marriage. Although some species may be now increasing, more or less rapidly, in numbers, all cannot do so, for the world would not hold them. ---END TEXT---

176
Apr 27, 2026 09:39

Showing 1 to 20 of 483 results

Related Links

X f L