evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This evaluation assesses the engineer's ability to use nuqs parser builder methods (withDefault and withOptions) to configure query parameter parsing with default values, history modes, and other behaviors. The focus is on proper usage of these builder pattern methods to achieve the specified URL behavior.",
"type": "weighted_checklist",
"checklist": [
{
"name": "withDefault usage",
"description": "Uses .withDefault() method on parsers to provide default values for all four query parameters (search query defaults to empty string, category to 'all', min price to 0, and page to 1)",
"max_score": 30
},
{
"name": "String parser with default",
"description": "Correctly uses parseAsString with .withDefault('') or parseAsString.withDefault('all') for the search query and category parameters respectively",
"max_score": 15
},
{
"name": "Integer parser with default",
"description": "Correctly uses parseAsInteger with .withDefault(0) for min price and .withDefault(1) for page number parameters",
"max_score": 15
},
{
"name": "String literal type",
"description": "Uses parseAsStringLiteral or parseAsStringEnum for the category parameter to enforce type safety for the allowed values ('electronics', 'clothing', 'books', 'all')",
"max_score": 15
},
{
"name": "History mode configuration",
"description": "Uses .withOptions({ history: 'push' }) on the page parameter parser to create new history entries, while using default 'replace' mode (or explicit withOptions({ history: 'replace' })) for other parameters",
"max_score": 20
},
{
"name": "Parser method chaining",
"description": "Demonstrates proper method chaining by combining .withDefault() and .withOptions() methods on the same parser (e.g., parseAsInteger.withDefault(1).withOptions({ history: 'push' }))",
"max_score": 5
}
]
}