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 well the engineer uses the pdf2pic package's promise-based async operations to convert multiple PDF pages concurrently. The focus is on proper usage of async/await patterns, Promise.all for concurrent operations, and appropriate error handling within the promise chain.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses fromPath function",
"description": "Correctly imports and uses pdf2pic's fromPath function to initialize the converter with the PDF file path",
"max_score": 15
},
{
"name": "Promise-based conversion",
"description": "Uses the convert() method which returns a Promise for each page conversion operation",
"max_score": 20
},
{
"name": "Concurrent processing",
"description": "Uses Promise.all() or similar concurrent pattern to process multiple pages in parallel rather than sequentially",
"max_score": 25
},
{
"name": "Async function signature",
"description": "The convertPages function is declared as async or explicitly returns a Promise",
"max_score": 10
},
{
"name": "Error handling",
"description": "Uses try-catch blocks or .catch() handlers to properly handle promise rejections for individual page conversions",
"max_score": 20
},
{
"name": "Configuration options",
"description": "Passes the options object (format, savePath, saveFilename) correctly to the fromPath function",
"max_score": 10
}
]
}