Test fixture
Code transformation while preserving behavior and intent.
The model receives the prompt (and optional system message). The run uses scorer contains_any with the JSON configuration below. Pass/fail and partial credit are determined entirely by that scorer against the model output; no human grading.
Refactor without changing behavior. Return only Python code.
def score_order(order):
score = 0
if order.get("paid") == True:
score += 10
if order.get("priority") == True:
score += 10
if order.get("gift") == True:
score += 10
if order.get("international") == True:
score += 10
return score
{
"expected_contains": [
"for key in",
"sum(",
"("
]
}temperature
0
max_tokens
220
timeout (s)
120
type
scored
file
refactoring_medium_03.json