docs
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 how effectively the engineer uses the pixelmatch package to implement image comparison functionality. The focus is on proper usage of pixelmatch's core API for basic pixel-level comparison including buffer handling, dimension parameters, threshold control, and diff output generation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import pixelmatch",
"description": "The solution imports or requires the pixelmatch package correctly (e.g., `const pixelmatch = require('pixelmatch')` or similar)",
"max_score": 10
},
{
"name": "Call pixelmatch function",
"description": "The solution calls the pixelmatch function with the correct parameters: img1, img2, output (or null), width, height, and options object",
"max_score": 25
},
{
"name": "Pass image buffers",
"description": "The solution correctly passes the img1 and img2 buffers as the first two arguments to pixelmatch without unnecessary conversion or copying",
"max_score": 15
},
{
"name": "Pass dimensions correctly",
"description": "The solution passes width and height parameters to pixelmatch in the correct order and position (4th and 5th arguments)",
"max_score": 10
},
{
"name": "Use threshold option",
"description": "The solution uses the threshold option from the options parameter and passes it correctly to pixelmatch's options object (e.g., `{threshold: options.threshold}`)",
"max_score": 15
},
{
"name": "Handle output buffer",
"description": "The solution passes the output buffer from options.output to pixelmatch as the third argument, supporting null/undefined when no diff output is needed",
"max_score": 15
},
{
"name": "Return mismatch count",
"description": "The solution returns the result from pixelmatch directly, which represents the count of differing pixels",
"max_score": 10
}
]
}