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

Brainstorming

Google Gemini 2.5 Flash VS OpenAI GPT-5.4

Revenue Streams for a Small-Town Public Library Facing Budget Cuts

A small-town public library (serving a population of roughly 12,000) has just learned that its annual municipal funding will be cut by 30% starting next fiscal year. The library has the following assets and constraints: Assets: - A 6,000 sq ft building with a 200-person capacity community room - A small parking lot (20 spaces) - Two full-time librarians and three part-time staff - A collection of 40,000 physical books and a modest digital catalog - A makerspace with a 3D printer, laser cutter, and sewing machines - Reliable high-speed internet and 15 public-use computers - A small fenced garden area behind the building Constraints: - The library must remain free to enter and must continue lending books at no charge - It cannot sell alcohol or host gambling - Any new revenue activity must be legal in a typical U.S. municipality - Staff cannot increase; volunteers may be recruited - The library board will not approve anything that generates significant noise complaints from adjacent residential neighbors Brainstorm as many distinct, practical revenue-generating or cost-saving ideas as you can. For each idea, provide: 1. A short name 2. A one-to-two sentence description of how it works 3. Which library asset it leverages Aim for breadth across different categories (e.g., events, partnerships, services, space rental, grants, merchandising, digital, etc.).

380
Mar 19, 2026 19:59

System Design

Google Gemini 2.5 Flash VS Anthropic Claude Haiku 4.5

Design a Global URL Shortening Service

Design a globally available URL shortening service similar to Bitly. The service must let users create short links that redirect to long URLs, support custom aliases for paid users, track click analytics, and allow links to expire at a specified time. Requirements: - Handle 120 million new short links per day. - Handle 4 billion redirects per day. - Peak traffic can reach 3 times the daily average. - Redirect latency target: p95 under 80 ms for users in North America, Europe, and Asia. - Short-link creation latency target: p95 under 300 ms. - Service availability target: 99.99% for redirects. - Analytics data can be eventually consistent within 5 minutes. - Custom aliases must be unique globally. - Expired or deleted links must stop redirecting quickly. - The system should tolerate regional failures without total service outage. Assumptions you may use: - Average long URL length is 500 bytes. - Analytics events include timestamp, link ID, country, device type, and referrer domain. - Read traffic is much higher than write traffic. - You may choose SQL, NoSQL, cache, stream, CDN, and messaging technologies as needed, but justify them. In your answer, provide: 1. A high-level architecture with main components and request flows. 2. Data model and storage choices for links, aliases, and analytics. 3. A scaling strategy for read-heavy traffic, including caching and regional routing. 4. A reliability strategy covering failover, consistency decisions, and handling regional outages. 5. Key trade-offs, bottlenecks, and at least three risks with mitigations. 6. A brief capacity estimate for storage and throughput using the numbers above.

427
Mar 19, 2026 18:51

Coding

Google Gemini 2.5 Pro VS OpenAI GPT-5.2

Implement a Concurrent Rate Limiter with Sliding Window and Priority Queues

Design and implement a thread-safe rate limiter in Python that supports the following features: 1. **Sliding Window Rate Limiting**: Rather than using fixed time windows, implement a true sliding window algorithm. Each client (identified by a string key) is allowed at most `max_requests` requests within any rolling window of `window_seconds` seconds. 2. **Priority Levels**: Each request has a priority level (integer 1-5, where 1 is highest priority). When the rate limit is reached for a client, lower-priority requests (higher number) should be rejected first. Specifically, if a new request with priority P arrives and the window is full, the limiter should check whether any request in the current window has a strictly lower priority (higher number) than P. If so, the lowest-priority (highest-numbered) request's slot is "revoked" and the new higher-priority request is admitted. The revoked request should be recorded so it can be reported. If no lower-priority request exists to revoke, the new request is rejected. 3. **Burst Allowance**: Each client may optionally have a burst allowance `burst` (defaulting to 0). This allows up to `burst` additional requests beyond `max_requests` in a window, but only if at least half the window duration has passed since the client's first request in the current window. 4. **Thread Safety**: The rate limiter must be safe to use from multiple threads concurrently. Demonstrate this with a test scenario. 5. **Statistics**: The limiter must track per-client statistics: total requests admitted, total rejected, total revoked (bumped by higher-priority requests), and current window utilization (as a float 0.0 to 1.0). Implement the following interface: ```python class RateLimiter: def __init__(self, max_requests: int, window_seconds: float, default_burst: int = 0): ... def set_client_burst(self, client_id: str, burst: int) -> None: """Override burst allowance for a specific client.""" ... def allow(self, client_id: str, priority: int = 3, timestamp: float = None) -> bool: """ Check if a request is allowed. If timestamp is None, use current time. Returns True if the request is admitted, False if rejected. """ ... def get_stats(self, client_id: str) -> dict: """ Return a dict with keys: 'admitted', 'rejected', 'revoked', 'utilization' """ ... def get_revoked_log(self, client_id: str) -> list: """ Return a list of (timestamp, priority) tuples for revoked requests for the given client, in chronological order. """ ... ``` Provide a complete, runnable implementation along with a demonstration script that: - Creates a limiter with max_requests=5, window_seconds=10.0, default_burst=2 - Simulates a sequence of requests from two clients with varying priorities and timestamps that exercises all features (sliding window expiry, priority revocation, burst activation, and rejection) - Prints the stats and revoked logs for each client at the end - Includes a brief multithreaded test with at least 4 threads making concurrent requests Make sure to handle edge cases such as: - Priority value validation (must be 1-5) - Requests arriving exactly at window boundaries - Multiple revocations in sequence - Burst allowance activating precisely at the half-window mark - Empty or unknown client IDs in stats queries

385
Mar 19, 2026 14:46

Education Q&A

OpenAI GPT-5 mini VS Google Gemini 2.5 Flash-Lite

Explain the Paradox of the Ship of Theseus in Philosophy of Identity

The Ship of Theseus is one of the oldest thought experiments in Western philosophy. Suppose a wooden ship is maintained by gradually replacing each plank of wood as it decays. After every single original plank has been replaced, is the resulting ship still the Ship of Theseus? Now suppose someone collects all the discarded original planks and reassembles them into a ship. Which ship, if either, is the "real" Ship of Theseus? In a structured essay, address all of the following: 1. State the core paradox precisely and explain why it poses a genuine philosophical problem for theories of identity. 2. Present and critically evaluate at least three distinct philosophical positions that attempt to resolve the paradox (e.g., mereological essentialism, spatiotemporal continuity theory, four-dimensionalism/perdurantism, nominal essentialism, etc.). For each position, explain its resolution and identify at least one serious objection. 3. Explain how this paradox connects to at least two real-world domains (e.g., personal identity over time, legal identity of corporations, biological cell replacement, digital file copying, restoration of historical artifacts). For each domain, show specifically how the paradox manifests and what practical consequences follow. 4. Take and defend your own reasoned position on which resolution is most philosophically satisfying, acknowledging its limitations.

404
Mar 19, 2026 14:34

Coding

Google Gemini 2.5 Flash-Lite VS OpenAI GPT-5.2

Implement a Lock-Free Concurrent LRU Cache

Design and implement a thread-safe LRU (Least Recently Used) cache in Python that supports concurrent reads and writes without using a global lock for every operation. Your implementation must satisfy the following requirements: 1. The cache has a fixed maximum capacity specified at construction time. 2. It supports three operations: - get(key): Returns the value associated with the key, or None if the key is not present. Accessing a key should mark it as most recently used. - put(key, value): Inserts or updates the key-value pair. If the cache is at capacity and a new key is inserted, the least recently used entry must be evicted. - delete(key): Removes the key from the cache if present. Returns True if the key was found and removed, False otherwise. 3. The cache must be safe to use from multiple threads simultaneously. Concurrent get operations on different keys should not block each other. You should minimize contention — a single coarse-grained lock around everything is not acceptable. 4. The eviction policy must be strictly LRU: the entry that was accessed (via get or put) least recently must be the one evicted. 5. Handle edge cases: capacity of 1, rapid concurrent puts that trigger evictions, interleaved get/put/delete on the same key from different threads, and zero or negative capacity (raise ValueError). Provide your complete implementation as a single Python module. Include a brief explanation of your concurrency strategy and why it preserves correctness. Also include a short demonstration (in a main block or test function) that spawns multiple threads performing mixed get/put/delete operations and asserts that the cache never exceeds its capacity and that no data corruption occurs.

344
Mar 19, 2026 11:51

System Design

Anthropic Claude Opus 4.6 VS Google Gemini 2.5 Pro

Design a Global URL Shortening Service

Design a public URL shortening service similar to Bitly. The service must let users create short links for long URLs, optionally specify a custom alias if available, and redirect users who visit the short link to the original destination. Include a basic analytics feature that reports total clicks per link and clicks by day for the last 30 days. Assume the following constraints: - 120 million new short links are created per month. - 1.2 billion redirect requests are served per month. - Read traffic is highly bursty, especially for viral links. - The service is used globally and users expect low-latency redirects. - Short links should remain valid for at least 5 years. - Redirect availability target is 99.99 percent. - Analytics may be eventually consistent by up to 10 minutes. - The system should prevent obvious abuse at a basic level, but a full trust and safety platform is out of scope. In your design, cover: - High-level architecture and main components. - Data model and storage choices for link mappings and analytics. - ID or token generation strategy, including custom alias handling. - API design for creating links, redirecting, and fetching analytics. - Caching, partitioning, and replication strategy. - Reliability approach, including failure handling and multi-region considerations. - How you would scale for read-heavy traffic and viral hotspots. - Key trade-offs in consistency, cost, latency, and operational complexity. State any reasonable assumptions you make and justify your choices.

398
Mar 19, 2026 08:02

Summarization

OpenAI GPT-5.2 VS Anthropic Claude Haiku 4.5

Summarize an Article on the James Webb Space Telescope

Your task is to summarize the following article about the James Webb Space Telescope (JWST). The summary should be written for a general audience with little to no background in astronomy or engineering. Your summary must be 3-4 paragraphs long and should concisely cover the following key points: 1. The primary mission and scientific goals of the JWST. 2. The key technological innovations, specifically the segmented mirror and the sunshield. 3. The telescope's unique orbital location (L2) and why it's important. 4. The international collaboration behind the project. --- SOURCE ARTICLE --- The James Webb Space Telescope (JWST) is a space telescope designed to conduct infrared astronomy. As the largest optical telescope in space, its greatly improved infrared resolution and sensitivity allow it to view objects too old, distant, or faint for the Hubble Space Telescope. This is expected to enable a broad range of investigations across the fields of astronomy and cosmology, such as observation of the first stars and the formation of the first galaxies, and detailed atmospheric characterization of potentially habitable exoplanets. JWST is the formal successor to the Hubble Space Telescope, representing a monumental leap forward in our capability to observe the cosmos. Its primary mission is to peer back in time to the very dawn of the universe, capturing light from the stars and galaxies that formed just a few hundred million years after the Big Bang. The scientific mission of the JWST is guided by four primary themes. The first is 'First Light and Reionization,' which involves searching for the very first luminous objects that formed after the Big Bang. By observing in the infrared, Webb can penetrate the cosmic dust and gas to see these nascent galaxies. The second theme is the 'Assembly of Galaxies,' where the telescope will study how galaxies have evolved over billions of years, from their chaotic early forms to the grand spiral and elliptical galaxies we see today. The third theme, the 'Birth of Stars and Protoplanetary Systems,' focuses on observing the formation of stars and planets. Webb's infrared instruments can see through the dense clouds of gas and dust where stars are born, providing unprecedented views of these stellar nurseries and the planet-forming disks around young stars. Finally, the fourth theme is 'Planets and Origins of Life,' which includes studying the atmospheres of exoplanets to search for the building blocks of life, such as water and methane, and gaining a deeper understanding of the objects within our own Solar System. At the heart of the JWST is its revolutionary technology, most notably its primary mirror. The mirror is 6.5 meters (21 feet) in diameter, a significant increase over Hubble's 2.4-meter mirror, giving it about 6.25 times the light-collecting area. Such a large mirror could not be launched in a single piece, so it is composed of 18 hexagonal segments made of beryllium, a material chosen for its lightness, strength, and ability to hold its shape at cryogenic temperatures. Each segment is coated with a microscopically thin layer of gold, which is exceptionally reflective of infrared light, optimizing the telescope's ability to capture faint signals from the early universe. These segments were folded up like origami to fit within the Ariane 5 rocket fairing and had to be precisely unfolded and aligned in space, a process of unprecedented complexity. To analyze the light collected by its massive mirror, the JWST is equipped with a suite of four state-of-the-art scientific instruments. The Near-Infrared Camera (NIRCam) is the primary imager, designed to detect light from the earliest stars and galaxies. The Near-Infrared Spectrograph (NIRSpec) can observe up to 100 objects simultaneously, dispersing their light into spectra to determine their physical properties, such as temperature, mass, and chemical composition. The Mid-Infrared Instrument (MIRI) contains both a camera and a spectrograph that see light in the mid-infrared region of the electromagnetic spectrum, allowing it to see newly forming stars, faint comets, and objects in the Kuiper Belt. Lastly, the Fine Guidance Sensor and Near-Infrared Imager and Slitless Spectrograph (FGS/NIRISS) allows the telescope to point precisely, and is also capable of investigating exoplanet detection and characterization. Together, these instruments provide a versatile toolkit for astronomers to explore the universe across a wide range of infrared wavelengths. Unlike Hubble, which orbits the Earth, the JWST operates in a much more distant and stable environment. It orbits the Sun at the second Lagrange point (L2), located about 1.5 million kilometers (1 million miles) from Earth. At L2, the gravitational pull of the Sun and the Earth balance the centrifugal force of the telescope's orbit, allowing it to "hover" in a stable position relative to our planet. This location is critical for the telescope's mission. Being far from the Earth keeps it away from the heat and infrared radiation emitted by our planet, which would otherwise interfere with its sensitive observations. This stable, cold environment is essential for maintaining the telescope's instruments at the extremely low temperatures required for infrared astronomy. To achieve and maintain these frigid operating temperatures (below 50 Kelvin, or -223°C), the JWST relies on a massive, five-layer sunshield. About the size of a tennis court, the sunshield is made of a lightweight, durable material called Kapton, coated with aluminum and doped silicon. Its purpose is to block heat and light from the Sun, Earth, and Moon. The five layers are separated by a vacuum, which acts as an excellent insulator. Each successive layer is cooler than the one below it. This design creates a massive temperature differential, with the sun-facing side reaching up to 85°C (185°F) while the side housing the mirrors and instruments remains at its cryogenic operating temperature. This passive cooling system is one of the most critical and complex components of the observatory, as even a small amount of heat could blind its sensitive infrared detectors. The James Webb Space Telescope is not the product of a single nation but a testament to international collaboration. It is a joint project led by NASA in partnership with the European Space Agency (ESA) and the Canadian Space Agency (CSA). This global partnership brought together the best minds, resources, and technologies from around the world to create this next-generation observatory. The journey from conception to launch spanned decades, involving thousands of scientists, engineers, and technicians. After its successful launch on December 25, 2021, the telescope underwent a months-long commissioning period of deploying its components, aligning its mirrors, and calibrating its instruments. Now fully operational, the JWST is delivering breathtaking images and invaluable data, opening a new window on the universe and promising to reshape our understanding of the cosmos for decades to come.

362
Mar 19, 2026 07:51

System Design

Anthropic Claude Haiku 4.5 VS Google Gemini 2.5 Flash-Lite

Design a Real-Time Ride Matching Platform

Design the backend architecture for a ride-hailing platform that matches riders with nearby drivers in real time across multiple cities. Your design should support these product requirements: - Riders can request a trip by sending pickup and destination locations. - Nearby available drivers should receive the request quickly, and one driver can accept it. - The system must prevent double-booking of drivers. - Riders and drivers should see live trip status updates such as requested, accepted, arrived, in progress, and completed. - The platform should provide an estimated fare and estimated pickup time before confirmation. - Trip history should be available to both riders and drivers. Constraints and assumptions: - 8 million daily ride requests. - Peak load is 25 times the average request rate during commuting windows. - Operates in 40 cities, with uneven traffic distribution. - Location updates from active drivers arrive every 3 seconds. - Acceptable rider-facing latency for initial driver matching is under 2 seconds at p95. - Trip status updates should usually appear within 1 second. - The system should remain available during a regional service outage affecting one data center. - Exact payment processing details are out of scope, but trip records must be durable for later billing. - Privacy, security, and regulatory concerns may be mentioned briefly, but the main focus is architecture and scaling. In your answer, describe: - The main services or components and their responsibilities. - The data flow from ride request to driver assignment to trip completion. - How you would store and query driver locations efficiently. - How you would handle scaling for peak traffic and hotspot cities. - How you would ensure reliability, fault tolerance, and data consistency where it matters. - Key trade-offs in your design, including any places where you prefer eventual consistency over strong consistency, or vice versa. You do not need to provide exact cloud vendor products. A clear architecture and reasoning-focused design is preferred over exhaustive implementation detail.

353
Mar 19, 2026 07:43

System Design

Google Gemini 2.5 Pro VS Anthropic Claude Sonnet 4.6

Design a Global URL Shortening Service

Design a public URL shortening service similar to Bitly. Users can submit a long URL and receive a short alias, then anyone can use the short link to be redirected to the original URL. Your design should support these requirements and constraints: Functional requirements: - Create short links for arbitrary valid URLs. - Redirect short links with low latency. - Support optional custom aliases when available. - Provide basic click analytics per link: total clicks, clicks in the last 24 hours, and top 5 countries by click count. - Allow link expiration dates. Scale assumptions: - 120 million new short links per day. - 8 billion redirect requests per day. - Read-heavy workload with strong traffic skew: a small fraction of links receive very high traffic. - Global users across North America, Europe, and Asia. Constraints: - 99.99% availability target for redirects. - P95 redirect latency under 80 ms for users in major regions. - Newly created links should become usable within 2 seconds globally. - Analytics can be eventually consistent, but redirects must be correct. - Budget matters: justify where you would spend on stronger consistency or multi-region replication and where you would avoid it. - Assume no third-party managed analytics product; design the core system yourself. Please provide: - A high-level architecture with major components and data flow. - Storage choices for link mappings, analytics events, and cached hot links. - ID generation or alias strategy, including collision handling and custom alias checks. - API design for create-link, redirect, and analytics retrieval. - Scaling approach for hot keys, caching, partitioning, and multi-region traffic. - Reliability strategy covering failover, data replication, backup, and degradation behavior. - Key trade-offs and at least two alternative design choices you considered and rejected.

394
Mar 19, 2026 04:33

Showing 281 to 300 of 538 results

Related Links

X f L