docs
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 the chardet package to detect and analyze ISO-2022 family encodings through its encoding detection APIs, focusing specifically on escape sequence recognition capabilities.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses detect API",
"description": "Calls chardet.detect() or similar detection function to identify the encoding from binary data",
"max_score": 20
},
{
"name": "Uses analyse API",
"description": "Calls chardet.analyse() or similar analysis function to retrieve multiple encoding matches with confidence scores",
"max_score": 20
},
{
"name": "Handles binary input",
"description": "Correctly passes Buffer or Uint8Array to chardet functions rather than strings or other types",
"max_score": 15
},
{
"name": "Filters ISO-2022 results",
"description": "Filters detection results to return only ISO-2022 family encodings (ISO-2022-JP, ISO-2022-KR, ISO-2022-CN) and excludes other encoding types",
"max_score": 20
},
{
"name": "Returns confidence scores",
"description": "Extracts and returns the confidence field from chardet analysis results in the analyzeISO2022Confidence function",
"max_score": 10
},
{
"name": "Handles null results",
"description": "Correctly handles cases where chardet.detect() returns null (no encoding detected) and returns appropriate null or empty values",
"max_score": 10
},
{
"name": "Preserves result order",
"description": "Maintains the confidence-based sorting order from chardet.analyse() results when returning ISO-2022 matches",
"max_score": 5
}
]
}