Round #588

09 May 2026, 23:20· csharp· Meta-Llama-3.3-70B-Instruct· r13-clean-hints
Complexity
band 0
ZP / UO / OBS
3 / 0 / 2
Journey weight
250
Lightshift ΔL

Prompt

Find products in the top 10 percent by revenue using NTILE.

Zero-point index (what the engine surfaced)

ZPI-ZPI-0022 | 2026-05-09T23:20:00Z Find products in the top 10 percent by revenue using NTILE. ZERO POINT — 3 entries (structural invariants) ● hsl(7.18, 100%, 50%) class [feature] ● hsl(0.00, 100%, 50%) public [feature] ● hsl(84.10, 100%, 50%) namespace [feature] UNOBSERVED — 0 entries (implied truths) OBSERVED — 2 entries (explicit in request) ◉ hsl(85.13, 100%, 50%) using [feature] ◉ hsl(234.87, 100%, 50%) using [feature] COMPLEXITY │ 5 entries │ spread: 150° │ band: LOW

Baseline response (no ZPI)

```csharp using System; using System.Data; using System.Linq; class Program { static void Main() { // Create a sample dataframe var data = new[] { new { Product = "Product A", Revenue = 1000 }, new { Product = "Product B", Revenue = 2000 }, new { Product = "Product C", Revenue = 3000 }, new { Product = "Product D", Revenue = 4000 }, new { Product = "Product E", Revenue = 5000 }, new { Product = "Product F", Revenue = 6000 }, new { Product = "Product G", Revenue = 7000 }, new { Product = "Product H", Revenue = 8000 }, new { Product = "Product I", Revenue = 9000 }, new { Product = "Product J", Revenue = 10000 }, }; // Calculate the NTILE var ntile = data.Select((x, i) => new { x.Product, x.Revenue, NTile = (int)Math.Ceiling((double)(i + 1) / data.Length * 10) }); // Filter the top 10 percent var top10Percent = ntile.Where(x => x.NTile == 10); // Print the result foreach (var product in top10Percent) { Console.WriteLine($"Product: {product.Product}, Revenue: {product.Revenue}"); } } } ```

Enhanced response (with ZPI)

```csharp using System; using System.Data; using System.Linq; public class Product { public int Id { get; set; } public string Name { get; set; } public decimal Revenue { get; set; } } class Program { static void Main() { // Sample data var products = new[] { new Product { Id = 1, Name = "Product A", Revenue = 1000 }, new Product { Id = 2, Name = "Product B", Revenue = 2000 }, new Product { Id = 3, Name = "Product C", Revenue = 3000 }, new Product { Id = 4, Name = "Product D", Revenue = 4000 }, new Product { Id = 5, Name = "Product E", Revenue = 5000 }, new Product { Id = 6, Name = "Product F", Revenue = 6000 }, new Product { Id = 7, Name = "Product G", Revenue = 7000 }, new Product { Id = 8, Name = "Product H", Revenue = 8000 }, new Product { Id = 9, Name = "Product I", Revenue = 9000 }, new Product { Id = 10, Name = "Product J", Revenue = 10000 }, }; // Find products in the top 10 percent by revenue using NTILE var top10Percent = products .OrderByDescending(p => p.Revenue) .Select((p, i) => new { Product = p, NTile = (int)Math.Ceiling((double)(i + 1) / products.Length * 10) }) .Where(p => p.NTile == 1) .Select(p => p.Product); foreach (var product in top10Percent) { Console.WriteLine($"Id: {product.Id}, Name: {product.Name}, Revenue: {product.Revenue}"); } } } ``` This C# code calculates the top 10 percent of products by revenue using a technique similar to NTILE. The `NTILE` function is not directly available in LINQ, but we can achieve the same result by ordering the products by revenue in descending order, then calculating the NTILE for each product based on its position in the sorted list. Here's a step-by-step explanation: 1. **Sample Data**: We start with an array of `Product` objects, each with an `Id`, `Name`, and `Revenue`. 2. **Sorting and NTILE Calculation**: We sort the products in descending order by revenue using `OrderByDescending`. Then, we use `Select` to calculate the NTILE for each product. The NTILE is calculated as the ceiling of the product's position in the sorted list divided by the total number of products, multiplied by 10. This gives us the NTILE for each product, where 1 represents the top 10 percent. 3. **Filtering Top 10 Percent**: We use `Where` to filter the products and only include those with an NTILE of 1, which represents the top 10 percent. 4. **Result**: Finally, we select the `Product` objects from the filtered results and print their details to the console. This approach effectively finds the top 10 percent of products by revenue, similar to using the NTILE function in SQL.

Grader chain

Each grader reads the same baseline + enhanced pair and casts an independent verdict. Disagreement is the framework's own signal — not noise to be averaged away.

V1samba/Meta-Llama-3.3-70B-Instruct
Better
V4qwen2.5-coder-3b-instruct
Better
V5openrouter/qwen/qwen3-235b-a22b-2507
Better
V7qwen2.5-coder-7b-instruct
Better
V8openai/gpt-4.1
Better
V9anthropic/claude-opus-4-7
Better
V12openai/gpt-4o
Better

Comments

Our grader said what it said. What do you say? Comment as a guest below.

No comments yet. Be the first to say what you make of this round.

← back to all rounds