Round #569

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

Prompt

Use a window function to rank orders within each customer.

Zero-point index (what the engine surfaced)

ZPI-ZPI-0003 | 2026-05-09T23:15:45Z Use a window function to rank orders within each customer. ZERO POINT — 0 entries (structural invariants) UNOBSERVED — 0 entries (implied truths) OBSERVED — 0 entries (explicit in request) COMPLEXITY │ 0 entries │ spread: 0° │ band: LOW

Baseline response (no ZPI)

```csharp using System; using System.Data; using System.Linq; class Program { static void Main() { // Create a sample DataTable var data = new[] { new { CustomerID = 1, OrderID = 1, OrderDate = DateTime.Parse("2020-01-01"), Total = 100 }, new { CustomerID = 1, OrderID = 2, OrderDate = DateTime.Parse("2020-01-15"), Total = 200 }, new { CustomerID = 1, OrderID = 3, OrderDate = DateTime.Parse("2020-02-01"), Total = 300 }, new { CustomerID = 2, OrderID = 4, OrderDate = DateTime.Parse("2020-01-05"), Total = 150 }, new { CustomerID = 2, OrderID = 5, OrderDate = DateTime.Parse("2020-02-15"), Total = 250 }, new { CustomerID = 3, OrderID = 6, OrderDate = DateTime.Parse("2020-03-01"), Total = 400 }, new { CustomerID = 3, OrderID = 7, OrderDate = DateTime.Parse("2020-03-15"), Total = 350 }, new { CustomerID = 3, OrderID = 8, OrderDate = DateTime.Parse("2020-04-01"), Total = 500 } }; // Use LINQ to rank orders within each customer var rankedData = data .OrderBy(x => x.CustomerID) .ThenBy(x => x.OrderDate) .Select((x, i) => new { CustomerID = x.CustomerID, OrderID = x.OrderID, OrderDate = x.OrderDate, Total = x.Total, Rank = data .Where(y => y.CustomerID == x.CustomerID) .OrderBy(y => y.OrderDate) .Select((y, j) => new { y.CustomerID, y.OrderDate, Index = j }) .Where(y => y.CustomerID == x.CustomerID && y.OrderDate == x.OrderDate) .Select(y => y.Index + 1) .First() }); // Print the ranked data foreach (var item in rankedData) { Console.WriteLine($"CustomerID: {item.CustomerID}, OrderID: {item.OrderID}, OrderDate: {item.OrderDate.ToString("yyyy-MM-dd")}, Total: {item.Total}, Rank: {item.Rank}"); } } } ```

Enhanced response (with ZPI)

```csharp using System; using System.Data; using System.Linq; public class Order { public int CustomerId { get; set; } public int OrderId { get; set; } public DateTime OrderDate { get; set; } public decimal Total { get; set; } } class Program { static void Main() { var orders = new[] { new Order { CustomerId = 1, OrderId = 1, OrderDate = DateTime.Parse("2022-01-01"), Total = 100.00m }, new Order { CustomerId = 1, OrderId = 2, OrderDate = DateTime.Parse("2022-01-15"), Total = 200.00m }, new Order { CustomerId = 1, OrderId = 3, OrderDate = DateTime.Parse("2022-02-01"), Total = 50.00m }, new Order { CustomerId = 2, OrderId = 4, OrderDate = DateTime.Parse("2022-01-05"), Total = 150.00m }, new Order { CustomerId = 2, OrderId = 5, OrderDate = DateTime.Parse("2022-02-15"), Total = 250.00m }, new Order { CustomerId = 3, OrderId = 6, OrderDate = DateTime.Parse("2022-03-01"), Total = 300.00m }, }; var rankedOrders = orders .OrderBy(o => o.CustomerId) .ThenBy(o => o.OrderDate) .Select((o, i) => new { CustomerId = o.CustomerId, OrderId = o.OrderId, OrderDate = o.OrderDate, Total = o.Total, Rank = orders .Where(oo => oo.CustomerId == o.CustomerId) .OrderBy(oo => oo.OrderDate) .Select((oo, ii) => new { OrderId = oo.OrderId, Index = ii }) .Where(oo => oo.OrderId == o.OrderId) .Select(oo => oo.Index + 1) .FirstOrDefault() }); foreach (var order in rankedOrders) { Console.WriteLine($"Customer ID: {order.CustomerId}, Order ID: {order.OrderId}, Order Date: {order.OrderDate}, Total: {order.Total}, Rank: {order.Rank}"); } } } ``` This C# code uses LINQ to rank orders within each customer based on the order date. The `OrderBy` and `ThenBy` methods are used to sort the orders by customer ID and order date, respectively. The `Select` method is then used to project the sorted orders into a new anonymous type that includes the rank of each order. The rank is calculated by using the `Where` method to filter the orders for the current customer, and then using the `OrderBy` method to sort these orders by date. The `Select` method is then used to project the sorted orders into a new anonymous type that includes the index of each order, and the `Where` method is used to filter the orders to only include the current order. The `Select` method is then used to project the filtered orders into a new anonymous type that includes the rank of the current order, which is calculated by adding 1 to the index of the order. Finally, the ranked orders are printed to the console.

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
Same
V8openai/gpt-4.1
Better
V9anthropic/claude-opus-4-7
Same
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