Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
22
22
split
stringclasses
1 value
source
stringclasses
1 value
source_family
stringclasses
36 values
thinking_mode
stringclasses
2 values
gate_token
stringclasses
2 values
difficulty
stringclasses
2 values
instruction
stringlengths
227
402
tests
listlengths
3
3
reasoning_summary
stringclasses
19 values
code
stringclasses
36 values
messages
listlengths
3
3
approx_tokens
int64
265
567
recommended_max_seq_length
int64
2.05k
2.05k
provenance
stringclasses
1 value
mbpp-style-gate-000001
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(8, 76) == 8 assert min_of_two(46, 95) == 46 assert min_of_two(48, -94) == -94
[ "assert min_of_two(8, 76) == 8", "assert min_of_two(46, 95) == 46", "assert min_of_two(48, -94) == -94" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
268
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000002
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(20, 17) == 17 assert min_of_two(-82, -76) == -82 assert min_of_two(-28, -54) == -54
[ "assert min_of_two(20, 17) == 17", "assert min_of_two(-82, -76) == -82", "assert min_of_two(-28, -54) == -54" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
272
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000003
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-63, 14) == -63 assert min_of_two(-31, -2) == -31 assert min_of_two(-24, 93) == -24
[ "assert min_of_two(-63, 14) == -63", "assert min_of_two(-31, -2) == -31", "assert min_of_two(-24, 93) == -24" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
277
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000004
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-92, -77) == -92 assert min_of_two(75, -4) == -4 assert min_of_two(22, -48) == -48
[ "assert min_of_two(-92, -77) == -92", "assert min_of_two(75, -4) == -4", "assert min_of_two(22, -48) == -48" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
274
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000005
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(77, -41) == -41 assert min_of_two(-47, 16) == -47 assert min_of_two(-45, 26) == -45
[ "assert min_of_two(77, -41) == -41", "assert min_of_two(-47, 16) == -47", "assert min_of_two(-45, 26) == -45" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
275
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000006
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(3, -7) == -7 assert min_of_two(-10, 88) == -10 assert min_of_two(12, -13) == -13
[ "assert min_of_two(3, -7) == -7", "assert min_of_two(-10, 88) == -10", "assert min_of_two(12, -13) == -13" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
274
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000007
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(92, -52) == -52 assert min_of_two(-90, -4) == -90 assert min_of_two(87, 1) == 1
[ "assert min_of_two(92, -52) == -52", "assert min_of_two(-90, -4) == -90", "assert min_of_two(87, 1) == 1" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
275
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000008
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-90, 14) == -90 assert min_of_two(-86, 92) == -86 assert min_of_two(90, -16) == -16
[ "assert min_of_two(-90, 14) == -90", "assert min_of_two(-86, 92) == -86", "assert min_of_two(90, -16) == -16" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
274
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000009
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(0, -38) == -38 assert min_of_two(-74, 54) == -74 assert min_of_two(-42, 3) == -42
[ "assert min_of_two(0, -38) == -38", "assert min_of_two(-74, 54) == -74", "assert min_of_two(-42, 3) == -42" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
272
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000010
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-68, 81) == -68 assert min_of_two(-14, 11) == -14 assert min_of_two(-77, -56) == -77
[ "assert min_of_two(-68, 81) == -68", "assert min_of_two(-14, 11) == -14", "assert min_of_two(-77, -56) == -77" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
277
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000011
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(1, -45) == -45 assert min_of_two(22, -68) == -68 assert min_of_two(-46, 12) == -46
[ "assert min_of_two(1, -45) == -45", "assert min_of_two(22, -68) == -68", "assert min_of_two(-46, 12) == -46" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
273
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000012
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-35, 60) == -35 assert min_of_two(-20, 18) == -20 assert min_of_two(36, -45) == -45
[ "assert min_of_two(-35, 60) == -35", "assert min_of_two(-20, 18) == -20", "assert min_of_two(36, -45) == -45" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
272
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000013
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-30, -25) == -30 assert min_of_two(-5, 99) == -5 assert min_of_two(-96, -22) == -96
[ "assert min_of_two(-30, -25) == -30", "assert min_of_two(-5, 99) == -5", "assert min_of_two(-96, -22) == -96" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
278
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000014
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-35, -49) == -49 assert min_of_two(-27, 10) == -27 assert min_of_two(-1, 3) == -1
[ "assert min_of_two(-35, -49) == -49", "assert min_of_two(-27, 10) == -27", "assert min_of_two(-1, 3) == -1" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
274
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000015
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(66, 9) == 9 assert min_of_two(-77, -40) == -77 assert min_of_two(8, -96) == -96
[ "assert min_of_two(66, 9) == 9", "assert min_of_two(-77, -40) == -77", "assert min_of_two(8, -96) == -96" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
274
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000016
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(65, -55) == -55 assert min_of_two(-64, -72) == -72 assert min_of_two(-4, 22) == -4
[ "assert min_of_two(65, -55) == -55", "assert min_of_two(-64, -72) == -72", "assert min_of_two(-4, 22) == -4" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
275
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000017
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(16, -52) == -52 assert min_of_two(-94, -39) == -94 assert min_of_two(30, -65) == -65
[ "assert min_of_two(16, -52) == -52", "assert min_of_two(-94, -39) == -94", "assert min_of_two(30, -65) == -65" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
278
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000018
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(57, -23) == -23 assert min_of_two(71, 54) == 54 assert min_of_two(63, -30) == -30
[ "assert min_of_two(57, -23) == -23", "assert min_of_two(71, 54) == 54", "assert min_of_two(63, -30) == -30" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
272
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000019
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(92, 100) == 92 assert min_of_two(28, 74) == 28 assert min_of_two(73, -27) == -27
[ "assert min_of_two(92, 100) == 92", "assert min_of_two(28, 74) == 28", "assert min_of_two(73, -27) == -27" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
267
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000020
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(-53, -24) == -53 assert min_of_two(-42, 57) == -42 assert min_of_two(17, -53) == -53
[ "assert min_of_two(-53, -24) == -53", "assert min_of_two(-42, 57) == -42", "assert min_of_two(17, -53) == -53" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
277
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000021
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(90, 58) == 58 assert min_of_two(-17, 59) == -17 assert min_of_two(68, 68) == 68
[ "assert min_of_two(90, 58) == 58", "assert min_of_two(-17, 59) == -17", "assert min_of_two(68, 68) == 68" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
268
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000022
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(89, 75) == 75 assert min_of_two(-17, 89) == -17 assert min_of_two(49, -79) == -79
[ "assert min_of_two(89, 75) == 75", "assert min_of_two(-17, 89) == -17", "assert min_of_two(49, -79) == -79" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
270
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000023
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(26, -55) == -55 assert min_of_two(-58, -10) == -58 assert min_of_two(73, -64) == -64
[ "assert min_of_two(26, -55) == -55", "assert min_of_two(-58, -10) == -58", "assert min_of_two(73, -64) == -64" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
277
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000024
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(78, -70) == -70 assert min_of_two(-43, -61) == -61 assert min_of_two(41, 94) == 41
[ "assert min_of_two(78, -70) == -70", "assert min_of_two(-43, -61) == -61", "assert min_of_two(41, 94) == 41" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
272
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000025
train
synthetic_mbpp_style_v1
min_of_two
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `min_of_two(x, y)` that returns the smaller of two numbers. Tests: assert min_of_two(3, 1) == 1 assert min_of_two(-46, 81) == -46 assert min_of_two(36, 77) == 36
[ "assert min_of_two(3, 1) == 1", "assert min_of_two(-46, 81) == -46", "assert min_of_two(36, 77) == 36" ]
def min_of_two(x, y): return x if x < y else y
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
271
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000026
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(1, 21, 31) == 31 assert max_of_three(47, 22, -14) == 47 assert max_of_three(69, 53, 8) == 69
[ "assert max_of_three(1, 21, 31) == 31", "assert max_of_three(47, 22, -14) == 47", "assert max_of_three(69, 53, 8) == 69" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
280
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000027
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-20, 66, 28) == 66 assert max_of_three(-18, -45, 47) == 47 assert max_of_three(17, 54, 16) == 54
[ "assert max_of_three(-20, 66, 28) == 66", "assert max_of_three(-18, -45, 47) == 47", "assert max_of_three(17, 54, 16) == 54" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
281
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000028
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(76, 59, -44) == 76 assert max_of_three(31, 72, 26) == 72 assert max_of_three(-19, 5, 5) == 5
[ "assert max_of_three(76, 59, -44) == 76", "assert max_of_three(31, 72, 26) == 72", "assert max_of_three(-19, 5, 5) == 5" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
284
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000029
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(51, 77, 53) == 77 assert max_of_three(67, 37, 10) == 67 assert max_of_three(-28, 70, 11) == 70
[ "assert max_of_three(51, 77, 53) == 77", "assert max_of_three(67, 37, 10) == 67", "assert max_of_three(-28, 70, 11) == 70" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
280
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000030
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-15, -32, 60) == 60 assert max_of_three(6, 47, -18) == 47 assert max_of_three(-41, 3, -30) == 3
[ "assert max_of_three(-15, -32, 60) == 60", "assert max_of_three(6, 47, -18) == 47", "assert max_of_three(-41, 3, -30) == 3" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000031
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(11, 65, 78) == 78 assert max_of_three(22, 73, 4) == 73 assert max_of_three(65, 71, 42) == 71
[ "assert max_of_three(11, 65, 78) == 78", "assert max_of_three(22, 73, 4) == 73", "assert max_of_three(65, 71, 42) == 71" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
280
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000032
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(41, 26, -8) == 41 assert max_of_three(-39, 51, -20) == 51 assert max_of_three(21, 46, -36) == 46
[ "assert max_of_three(41, 26, -8) == 41", "assert max_of_three(-39, 51, -20) == 51", "assert max_of_three(21, 46, -36) == 46" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000033
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-32, 69, 29) == 69 assert max_of_three(-27, 3, 63) == 63 assert max_of_three(48, 16, 71) == 71
[ "assert max_of_three(-32, 69, 29) == 69", "assert max_of_three(-27, 3, 63) == 63", "assert max_of_three(48, 16, 71) == 71" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
283
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000034
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-44, 16, 4) == 16 assert max_of_three(-3, 53, 8) == 53 assert max_of_three(59, 15, 38) == 59
[ "assert max_of_three(-44, 16, 4) == 16", "assert max_of_three(-3, 53, 8) == 53", "assert max_of_three(59, 15, 38) == 59" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
280
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000035
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-38, -44, 58) == 58 assert max_of_three(-34, 52, -24) == 52 assert max_of_three(14, -30, 66) == 66
[ "assert max_of_three(-38, -44, 58) == 58", "assert max_of_three(-34, 52, -24) == 52", "assert max_of_three(14, -30, 66) == 66" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000036
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(21, 53, 37) == 53 assert max_of_three(69, -4, 10) == 69 assert max_of_three(55, -32, -35) == 55
[ "assert max_of_three(21, 53, 37) == 53", "assert max_of_three(69, -4, 10) == 69", "assert max_of_three(55, -32, -35) == 55" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
283
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000037
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(45, 50, 20) == 50 assert max_of_three(73, -28, 76) == 76 assert max_of_three(-36, -39, -25) == -25
[ "assert max_of_three(45, 50, 20) == 50", "assert max_of_three(73, -28, 76) == 76", "assert max_of_three(-36, -39, -25) == -25" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
284
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000038
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(17, 35, 7) == 35 assert max_of_three(62, 43, -39) == 62 assert max_of_three(60, -23, 79) == 79
[ "assert max_of_three(17, 35, 7) == 35", "assert max_of_three(62, 43, -39) == 62", "assert max_of_three(60, -23, 79) == 79" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
284
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000039
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-15, 35, 75) == 75 assert max_of_three(-31, -28, -24) == -24 assert max_of_three(47, -12, 2) == 47
[ "assert max_of_three(-15, 35, 75) == 75", "assert max_of_three(-31, -28, -24) == -24", "assert max_of_three(47, -12, 2) == 47" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000040
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(58, 61, -39) == 61 assert max_of_three(-3, 2, 51) == 51 assert max_of_three(-44, -5, 61) == 61
[ "assert max_of_three(58, 61, -39) == 61", "assert max_of_three(-3, 2, 51) == 51", "assert max_of_three(-44, -5, 61) == 61" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000041
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-15, 27, 48) == 48 assert max_of_three(18, -34, 47) == 47 assert max_of_three(-28, 15, -29) == 15
[ "assert max_of_three(-15, 27, 48) == 48", "assert max_of_three(18, -34, 47) == 47", "assert max_of_three(-28, 15, -29) == 15" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
285
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000042
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-29, -24, -32) == -24 assert max_of_three(-39, 25, 63) == 63 assert max_of_three(-46, 52, -30) == 52
[ "assert max_of_three(-29, -24, -32) == -24", "assert max_of_three(-39, 25, 63) == 63", "assert max_of_three(-46, 52, -30) == 52" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
291
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000043
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-3, -8, 35) == 35 assert max_of_three(-19, 11, 6) == 11 assert max_of_three(29, 14, -33) == 29
[ "assert max_of_three(-3, -8, 35) == 35", "assert max_of_three(-19, 11, 6) == 11", "assert max_of_three(29, 14, -33) == 29" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
285
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000044
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-7, 41, -49) == 41 assert max_of_three(40, 32, -2) == 40 assert max_of_three(49, 35, -30) == 49
[ "assert max_of_three(-7, 41, -49) == 41", "assert max_of_three(40, 32, -2) == 40", "assert max_of_three(49, 35, -30) == 49" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
283
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000045
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(34, -22, -28) == 34 assert max_of_three(0, 9, -36) == 9 assert max_of_three(68, -37, -30) == 68
[ "assert max_of_three(34, -22, -28) == 34", "assert max_of_three(0, 9, -36) == 9", "assert max_of_three(68, -37, -30) == 68" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000046
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(17, -37, -14) == 17 assert max_of_three(66, 63, 60) == 66 assert max_of_three(41, 1, 50) == 50
[ "assert max_of_three(17, -37, -14) == 17", "assert max_of_three(66, 63, 60) == 66", "assert max_of_three(41, 1, 50) == 50" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
281
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000047
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(-23, 13, 59) == 59 assert max_of_three(15, -2, 10) == 15 assert max_of_three(76, -31, 62) == 76
[ "assert max_of_three(-23, 13, 59) == 59", "assert max_of_three(15, -2, 10) == 15", "assert max_of_three(76, -31, 62) == 76" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
281
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000048
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(59, 23, 36) == 59 assert max_of_three(27, 29, 24) == 29 assert max_of_three(-26, -46, -33) == -26
[ "assert max_of_three(59, 23, 36) == 59", "assert max_of_three(27, 29, 24) == 29", "assert max_of_three(-26, -46, -33) == -26" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000049
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(9, 46, 8) == 46 assert max_of_three(-5, -22, -49) == -5 assert max_of_three(-41, -33, 66) == 66
[ "assert max_of_three(9, 46, 8) == 46", "assert max_of_three(-5, -22, -49) == -5", "assert max_of_three(-41, -33, 66) == 66" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000050
train
synthetic_mbpp_style_v1
max_of_three
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `max_of_three(a, b, c)` that returns the largest of three numbers. Tests: assert max_of_three(71, -25, 2) == 71 assert max_of_three(-33, -42, -18) == -18 assert max_of_three(68, -26, 11) == 68
[ "assert max_of_three(71, -25, 2) == 71", "assert max_of_three(-33, -42, -18) == -18", "assert max_of_three(68, -26, 11) == 68" ]
def max_of_three(a, b, c): return max(a, b, c)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
288
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000051
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-10, 8, -2, -6, -3]) == -13 assert sum_list([-10, 12, -2, 7, 11, -3, -7, -1, -8]) == -1 assert sum_list([2, 7, 7]) == 16
[ "assert sum_list([-10, 8, -2, -6, -3]) == -13", "assert sum_list([-10, 12, -2, 7, 11, -3, -7, -1, -8]) == -1", "assert sum_list([2, 7, 7]) == 16" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
308
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000052
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-5, 15, 13, 1]) == 24 assert sum_list([-6, 13, -6, 0, 12, -8, 6, 13, -8]) == 16 assert sum_list([0, 14, 10, 3, -3, 11]) == 35
[ "assert sum_list([-5, 15, 13, 1]) == 24", "assert sum_list([-6, 13, -6, 0, 12, -8, 6, 13, -8]) == 16", "assert sum_list([0, 14, 10, 3, -3, 11]) == 35" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
305
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000053
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([1, 6, 14, -4]) == 17 assert sum_list([14, 0, 10, -8]) == 16 assert sum_list([3, 1, 7, 5, -10, 10]) == 16
[ "assert sum_list([1, 6, 14, -4]) == 17", "assert sum_list([14, 0, 10, -8]) == 16", "assert sum_list([3, 1, 7, 5, -10, 10]) == 16" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
293
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000054
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-10, -4, 1, 13, 4, 12, 15, -8, 0]) == 23 assert sum_list([13, -6, -4]) == 3 assert sum_list([12, 8, 5]) == 25
[ "assert sum_list([-10, -4, 1, 13, 4, 12, 15, -8, 0]) == 23", "assert sum_list([13, -6, -4]) == 3", "assert sum_list([12, 8, 5]) == 25" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
296
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000055
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([11, 1, -8]) == 4 assert sum_list([-9, -3, 15, -6, 9, -8]) == -2 assert sum_list([-6, 5, -7, -1, 10, 4, 7, -3]) == 9
[ "assert sum_list([11, 1, -8]) == 4", "assert sum_list([-9, -3, 15, -6, 9, -8]) == -2", "assert sum_list([-6, 5, -7, -1, 10, 4, 7, -3]) == 9" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
308
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000056
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-4, 1, -2, -9, 5, 7, 13, 11, -8]) == 14 assert sum_list([5, 6, 1, 8, 5, 2, -1, -1, -3]) == 22 assert sum_list([14, -10, -1, 8]) == 11
[ "assert sum_list([-4, 1, -2, -9, 5, 7, 13, 11, -8]) == 14", "assert sum_list([5, 6, 1, 8, 5, 2, -1, -1, -3]) == 22", "assert sum_list([14, -10, -1, 8]) == 11" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
318
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000057
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([6, -5, 12, -9]) == 4 assert sum_list([-6, 3, -5, 2, -4, 5]) == -5 assert sum_list([5, 6, 5]) == 16
[ "assert sum_list([6, -5, 12, -9]) == 4", "assert sum_list([-6, 3, -5, 2, -4, 5]) == -5", "assert sum_list([5, 6, 5]) == 16" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
296
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000058
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-6, 10, 13, -2, -4]) == 11 assert sum_list([10, 15, -7]) == 18 assert sum_list([-9, 1, 8, 12, 1]) == 13
[ "assert sum_list([-6, 10, 13, -2, -4]) == 11", "assert sum_list([10, 15, -7]) == 18", "assert sum_list([-9, 1, 8, 12, 1]) == 13" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
292
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000059
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-5, 12, 0, -7, -2, 8, 4, 11, -4]) == 17 assert sum_list([-7, 7, 15, 8]) == 23 assert sum_list([8, 4, 5]) == 17
[ "assert sum_list([-5, 12, 0, -7, -2, 8, 4, 11, -4]) == 17", "assert sum_list([-7, 7, 15, 8]) == 23", "assert sum_list([8, 4, 5]) == 17" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
297
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000060
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([15, 11, 11, 4, 15, -1, 2, -3]) == 54 assert sum_list([-3, 4, 1, 6, 4, -9, -2, -3]) == -2 assert sum_list([-1, -2, 6, -7, 2, 14, -9, 11]) == 14
[ "assert sum_list([15, 11, 11, 4, 15, -1, 2, -3]) == 54", "assert sum_list([-3, 4, 1, 6, 4, -9, -2, -3]) == -2", "assert sum_list([-1, -2, 6, -7, 2, 14, -9, 11]) == 14" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
326
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000061
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([5, 14, 9, 10, 13, 1, -10, 9]) == 51 assert sum_list([2, -6, 11, 2]) == 9 assert sum_list([3, 0, -2, -7, -3, 1]) == -8
[ "assert sum_list([5, 14, 9, 10, 13, 1, -10, 9]) == 51", "assert sum_list([2, -6, 11, 2]) == 9", "assert sum_list([3, 0, -2, -7, -3, 1]) == -8" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
304
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000062
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([10, 15, 8, 6, -10, -5, -10, 11]) == 25 assert sum_list([13, 1, 11, 2]) == 27 assert sum_list([-8, 11, -7, 5]) == 1
[ "assert sum_list([10, 15, 8, 6, -10, -5, -10, 11]) == 25", "assert sum_list([13, 1, 11, 2]) == 27", "assert sum_list([-8, 11, -7, 5]) == 1" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
297
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000063
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([5, -10, -1, 9]) == 3 assert sum_list([-5, 13, 3, 14, 11, 0, -8, 15]) == 43 assert sum_list([-3, -4, -10, -8, -4, 5, 10, -10, 5]) == -19
[ "assert sum_list([5, -10, -1, 9]) == 3", "assert sum_list([-5, 13, 3, 14, 11, 0, -8, 15]) == 43", "assert sum_list([-3, -4, -10, -8, -4, 5, 10, -10, 5]) == -19" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
319
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000064
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([11, -2, -9, 4, -4, -9]) == -9 assert sum_list([6, 10, -6]) == 10 assert sum_list([-10, 13, -5]) == -2
[ "assert sum_list([11, -2, -9, 4, -4, -9]) == -9", "assert sum_list([6, 10, -6]) == 10", "assert sum_list([-10, 13, -5]) == -2" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
293
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000065
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([10, -5, 11, 13, -6, 2]) == 25 assert sum_list([1, 13, 8, 1, 6, -9, 10]) == 30 assert sum_list([-6, 8, 3, -7, -9]) == -11
[ "assert sum_list([10, -5, 11, 13, -6, 2]) == 25", "assert sum_list([1, 13, 8, 1, 6, -9, 10]) == 30", "assert sum_list([-6, 8, 3, -7, -9]) == -11" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
307
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000066
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([2, 0, 10, 11, -7, 7]) == 23 assert sum_list([-6, 14, 8, -4, -3, -4]) == 5 assert sum_list([-3, -8, -1, 0]) == -12
[ "assert sum_list([2, 0, 10, 11, -7, 7]) == 23", "assert sum_list([-6, 14, 8, -4, -3, -4]) == 5", "assert sum_list([-3, -8, -1, 0]) == -12" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
304
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000067
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-3, -4, 3]) == -4 assert sum_list([-3, 13, 3, -3, -8]) == 2 assert sum_list([-10, -10, -2, -5, 7, 0]) == -20
[ "assert sum_list([-3, -4, 3]) == -4", "assert sum_list([-3, 13, 3, -3, -8]) == 2", "assert sum_list([-10, -10, -2, -5, 7, 0]) == -20" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
304
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000068
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([8, -6, 14, 6, 2, 15, 7]) == 46 assert sum_list([-3, 14, -2, -9, -1]) == -1 assert sum_list([10, 15, -5]) == 20
[ "assert sum_list([8, -6, 14, 6, 2, 15, 7]) == 46", "assert sum_list([-3, 14, -2, -9, -1]) == -1", "assert sum_list([10, 15, -5]) == 20" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
299
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000069
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-1, -3, -6, 15, 15, -3, 2, -6, -5]) == 8 assert sum_list([11, 15, 1, 2, 14, 11, 3]) == 57 assert sum_list([-6, 15, 9, 14, 12, -9, -6]) == 29
[ "assert sum_list([-1, -3, -6, 15, 15, -3, 2, -6, -5]) == 8", "assert sum_list([11, 15, 1, 2, 14, 11, 3]) == 57", "assert sum_list([-6, 15, 9, 14, 12, -9, -6]) == 29" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
318
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000070
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([12, 15, -10]) == 17 assert sum_list([3, 6, 1, 10, 4, -5, 5, -8, -5]) == 11 assert sum_list([-9, 15, -7, 1, 12, 15]) == 27
[ "assert sum_list([12, 15, -10]) == 17", "assert sum_list([3, 6, 1, 10, 4, -5, 5, -8, -5]) == 11", "assert sum_list([-9, 15, -7, 1, 12, 15]) == 27" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
306
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000071
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([8, 0, 9, -2, -2, -5, 9, -3, 6]) == 20 assert sum_list([-6, 3, 14]) == 11 assert sum_list([-10, 2, 15, 0, 9, 14, 0, 0]) == 30
[ "assert sum_list([8, 0, 9, -2, -2, -5, 9, -3, 6]) == 20", "assert sum_list([-6, 3, 14]) == 11", "assert sum_list([-10, 2, 15, 0, 9, 14, 0, 0]) == 30" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
308
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000072
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([10, 13, -6, 14, 9, 4]) == 44 assert sum_list([3, 15, 12, 5, 11]) == 46 assert sum_list([4, 5, 5, -1]) == 13
[ "assert sum_list([10, 13, -6, 14, 9, 4]) == 44", "assert sum_list([3, 15, 12, 5, 11]) == 46", "assert sum_list([4, 5, 5, -1]) == 13" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
291
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000073
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([-1, 3, 14, 9, 8, -2]) == 31 assert sum_list([15, 11, 14, 1, 5, 7, -3, 13]) == 63 assert sum_list([7, 2, 8, -2]) == 15
[ "assert sum_list([-1, 3, 14, 9, 8, -2]) == 31", "assert sum_list([15, 11, 14, 1, 5, 7, -3, 13]) == 63", "assert sum_list([7, 2, 8, -2]) == 15" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
304
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000074
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([10, -2, -7, 7, 2, 7, -7, -8]) == 2 assert sum_list([-4, 12, 13, 9, -8, -7]) == 15 assert sum_list([5, -7, 12, 5, 7, 8, -7, 0]) == 23
[ "assert sum_list([10, -2, -7, 7, 2, 7, -7, -8]) == 2", "assert sum_list([-4, 12, 13, 9, -8, -7]) == 15", "assert sum_list([5, -7, 12, 5, 7, 8, -7, 0]) == 23" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
317
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000075
train
synthetic_mbpp_style_v1
sum_list
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `sum_list(nums)` that returns the sum of all numbers in a list. Tests: assert sum_list([12, 13, 8, 0, 5, 7, 7, -5]) == 47 assert sum_list([4, 3, -7, -6, -8, -7, -5, -10]) == -36 assert sum_list([-9, 2, 4]) == -3
[ "assert sum_list([12, 13, 8, 0, 5, 7, 7, -5]) == 47", "assert sum_list([4, 3, -7, -6, -8, -7, -5, -10]) == -36", "assert sum_list([-9, 2, 4]) == -3" ]
def sum_list(nums): return sum(nums)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
313
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000076
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000077
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
285
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000078
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
288
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000079
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000080
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
288
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000081
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000082
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
290
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000083
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000084
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
285
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000085
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
288
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000086
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000087
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Solve this Python programming task. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
285
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000088
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Write a correct Python solution for this task. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
288
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000089
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Complete the following Python function requirement. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000090
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Provide a Python implementation that passes all tests. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
288
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000091
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Implement a minimal, correct Python solution. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000092
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Solve the task and preserve the requested function signature. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
290
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000093
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Write Python code for the following requirement. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
287
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000094
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Implement the function described below. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
285
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000095
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Produce a correct Python implementation for this problem. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
288
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
mbpp-style-gate-000096
train
synthetic_mbpp_style_v1
count_char
direct
<DIRECT>
basic
Implement the following Python function correctly. Task: Write a function `count_char(text, ch)` that counts how many times `ch` occurs in `text`. Tests: assert count_char('programming', 'm') == 2 assert count_char('banana', 'a') == 3 assert count_char('mississippi', 's') == 4
[ "assert count_char('programming', 'm') == 2", "assert count_char('banana', 'a') == 3", "assert count_char('mississippi', 's') == 4" ]
def count_char(text, ch): return text.count(ch)
[ { "role": "system", "content": "You are an expert Python programmer.\nFor each programming task, choose the response mode yourself:\n- Use <DIRECT> when the task is straightforward and a short implementation is sufficient.\n- Use <THINK> when correctness benefits from algorithm selection, state tracking, in...
286
2,048
Generated MBPP-style training example; not copied from MBPP validation/test tasks.
End of preview. Expand in Data Studio

MBPP Thinking-Gate SFT Dataset

This package contains two related assets:

  1. Ready 1,000-row MBPP-style dataset (all.jsonl, train.jsonl, validation.jsonl). It is synthetic and designed to test/train autonomous routing between <DIRECT> and <THINK>.
  2. Official-MBPP builder (build_from_official_mbpp.py). Run this to create the production dataset from the official Google Research MBPP source.

Why two response modes?

The training target starts with one of two routing tokens:

  • <DIRECT> — simple transformation / lookup / short implementation. The answer goes directly to code.
  • <THINK> — algorithmic work where planning, state, an invariant, recursion, dynamic programming, search, or non-trivial control flow materially helps. The target contains a compact structured plan, then code.

The prompt does not tell the model which mode to choose. The target teaches the mode decision.

For <THINK> examples, the dataset stores a structured program plan (sequence / branch / loop-or-recursion / invariant), not a private hidden chain-of-thought transcript.

Ready dataset

  • 1,000 rows total
  • 900 train / 100 validation
  • 500 <THINK> / 500 <DIRECT>
  • train: 450 / 450
  • validation: 50 / 50
  • validation uses whole held-out problem families
  • every generated solution/test pair is executed during dataset creation

Main schema

id
split
source
source_family
thinking_mode
gate_token
difficulty
instruction
tests[]
reasoning_summary
code
messages[]     # ChatML-style role/content records
approx_tokens
recommended_max_seq_length
provenance

Long-context >1900-token version

Because the requested dataset also targets examples above ~1900 tokens, the package includes:

train_long_1900.jsonl
validation_long_1900.jsonl
all_long_1900.jsonl
stats_long_1900.json

These rows are not padded with meaningless prose. Each target task is preceded by alternating <DIRECT> and <THINK> solved routing demonstrations from training families until the tokenizer-independent estimate is at least 1950 tokens.

This follows the few-shot demonstration idea behind CoT prompting while keeping <THINK> content as compact structured program plans.

Important: approx_tokens >= 1950 is an estimate. Use validate_tokens.py with your exact model tokenizer for a hard 1900-token guarantee.

Build the production version from official MBPP

python build_from_official_mbpp.py --output-dir official_dataset

The builder downloads the official Google Research mbpp.jsonl and uses only task IDs 601–974, which are the official training split. It never trains on the official MBPP prompt, validation, or test tasks.

It creates:

official_dataset/train.jsonl        # 900
official_dataset/validation.jsonl   # 100
official_dataset/all.jsonl          # 1000
official_dataset/stats.json

The split is done by original source_task_id before augmentation, so the same MBPP problem cannot leak across train and validation.

Token limit: 1900

Token counts depend on the exact tokenizer. approx_tokens is only a rough estimate.

For an exact check with the target model tokenizer:

pip install transformers
python validate_tokens.py official_dataset/all.jsonl \
  --tokenizer YOUR_MODEL_OR_TOKENIZER_ID \
  --limit 1900

For training, a max_seq_length around 2048 gives room around a 1900-token content target. Do not lengthen short MBPP samples with fake reasoning merely to hit a token count; that teaches verbosity rather than useful deliberation.

Recommended SFT behavior

At inference, keep the same routing contract in the system prompt. The model should emit the gate token itself:

<DIRECT>
...code...

or

<THINK>
Structured plan:
...
...code...

You can later strip the gate token in your serving layer, or map <THINK> to a dedicated reasoning path.

Evaluation rule

Keep MBPP task IDs 11–510 untouched as the official test set. Do not include them in SFT data if you want a meaningful post-training MBPP score.

Attribution

Official MBPP source:

  • Google Research, Mostly Basic Python Problems (MBPP)
  • Released with Program Synthesis with Large Language Models (Austin et al.)
  • Source dataset is commonly distributed under CC-BY-4.0; retain attribution when redistributing a derivative.

Research basis:

  • Wei et al., Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, arXiv:2201.11903.
  • Li et al., Structured Chain-of-Thought Prompting for Code Generation, arXiv:2305.06599.
  • The supplied Gamma document was listed by the requester as a reference; the build does not depend on fetching it.
Downloads last month
83

Papers for islam-kamel/MBPP-Thinking-Gate-1k