Python compatibility wrapper for computing string edit distances and similarities using fast Levenshtein algorithms.
88
{
"context": "This evaluation assesses how well an engineer uses the Levenshtein package's hamming() function to solve a DNA mutation detection problem. The focus is entirely on correct usage of the package API, not on general code quality or style.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses hamming() function",
"description": "The solution uses Levenshtein.hamming() to count the differences between two equal-length strings",
"max_score": 40
},
{
"name": "Correct function import",
"description": "Properly imports the Levenshtein package (e.g., 'import Levenshtein' or 'from Levenshtein import hamming')",
"max_score": 15
},
{
"name": "Correct parameter passing",
"description": "Passes the two sequence strings as parameters to hamming() in the correct order",
"max_score": 15
},
{
"name": "Handles length validation",
"description": "Validates that sequences are equal length before calling hamming(), or handles the ValueError that hamming() raises for unequal lengths",
"max_score": 20
},
{
"name": "Handles empty sequences",
"description": "Validates that sequences are not empty before processing, raising ValueError as specified",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-python-levenshteindocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10