evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
{
"context": "This criteria evaluates how effectively the engineer uses oboe.js's node transformation capability to modify JSON data during streaming parsing. The focus is on proper use of the .node() callback's return value mechanism to transform prices in real-time.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses oboe function",
"description": "Code imports and invokes the oboe function (or oboe() call) to initiate HTTP requests and streaming JSON parsing",
"max_score": 10
},
{
"name": "Uses .node() method",
"description": "Code uses the .node(pattern, callback) method to register callbacks for matching JSON nodes during parsing",
"max_score": 15
},
{
"name": "JSONPath pattern targeting",
"description": "Code uses appropriate JSONPath patterns to target price nodes in the JSON structure (e.g., '!.products.*.price' or similar patterns depending on the JSON structure)",
"max_score": 15
},
{
"name": "Return value transformation",
"description": "Code returns a transformed value from the .node() callback to replace the original node value, implementing the core transformation mechanism",
"max_score": 25
},
{
"name": "Correct markup calculation",
"description": "The applyMarkup function correctly calculates the markup by multiplying the price by (1 + markupPercent/100) or equivalent logic",
"max_score": 10
},
{
"name": "Correct conversion calculation",
"description": "The convertCurrency function correctly multiplies the price by the conversion rate",
"max_score": 10
},
{
"name": "Uses .done() method",
"description": "Code uses the .done(callback) method to handle completion and return the final transformed result",
"max_score": 10
},
{
"name": "Promise-based API",
"description": "Functions return Promises that resolve with the transformed data, enabling async/await usage as specified in the API",
"max_score": 5
}
]
}