PBEBench: A Multi-Step Programming by Examples Reasoning Benchmark inspired by Historical Linguistics
Paper • 2505.23126 • Published
task_id stringlengths 16 16 | entry_point stringclasses 1
value | prompt stringlengths 893 1.15k | canonical_solution stringlengths 113 230 | canonical_pipeline listlengths 1 5 | test stringlengths 1.68k 2.65k | num_tests int64 40 40 | examples listlengths 8 8 | tests listlengths 32 32 | metadata dict |
|---|---|---|---|---|---|---|---|---|---|
pbe-world/000000 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.upper()
s = s.lower()
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "lower",
"args": []
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('b') == 'B'
assert candidate('aa') == 'AA'
assert candidate('baaaaaaaba') == 'BAAAAAAABA'
assert candidate('aa') == 'AA'
assert candidate('aababbaab') == 'AABABBAAB'
a... | 40 | [
{
"input": "b",
"output": "B"
},
{
"input": "aa",
"output": "AA"
},
{
"input": "baaaaaaaba",
"output": "BAAAAAAABA"
},
{
"input": "aa",
"output": "AA"
},
{
"input": "aababbaab",
"output": "AABABBAAB"
},
{
"input": "bbabbabab",
"output": "BBABBABAB"... | [
{
"input": "aaa",
"output": "AAA"
},
{
"input": "aaaabbb",
"output": "AAAABBB"
},
{
"input": "babb",
"output": "BABB"
},
{
"input": "bbb",
"output": "BBB"
},
{
"input": "ab",
"output": "AB"
},
{
"input": "aaababaabb",
"output": "AAABABAABB"
},
... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 4,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000001 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.lower()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abbbaaba') == 'abbbaaba'
assert candidate('b') == 'b'
assert candidate('bbaba') == 'bbaba'
assert candidate('bbabbaba') == 'bbabbaba'
assert candidate('b') == 'b'
ass... | 40 | [
{
"input": "abbbaaba",
"output": "abbbaaba"
},
{
"input": "b",
"output": "b"
},
{
"input": "bbaba",
"output": "bbaba"
},
{
"input": "bbabbaba",
"output": "bbabbaba"
},
{
"input": "b",
"output": "b"
},
{
"input": "ababbbaa",
"output": "ababbbaa"
}... | [
{
"input": "aba",
"output": "aba"
},
{
"input": "abab",
"output": "abab"
},
{
"input": "bbbbaaaa",
"output": "bbbbaaaa"
},
{
"input": "aaaaa",
"output": "aaaaa"
},
{
"input": "abb",
"output": "abb"
},
{
"input": "bbaabbbaab",
"output": "bbaabbbaab"... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000002 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
return s
| [
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbaaba') == 'bbaaba'
assert candidate('baab') == 'baab'
assert candidate('bbbb') == 'bbbb'
assert candidate('a') == 'a'
assert candidate('aabba') == 'aabba'
assert ca... | 40 | [
{
"input": "bbaaba",
"output": "bbaaba"
},
{
"input": "baab",
"output": "baab"
},
{
"input": "bbbb",
"output": "bbbb"
},
{
"input": "a",
"output": "a"
},
{
"input": "aabba",
"output": "aabba"
},
{
"input": "bb",
"output": "bb"
},
{
"input":... | [
{
"input": "abbbbba",
"output": "abbbbba"
},
{
"input": "aaaababa",
"output": "aaaababa"
},
{
"input": "ababbbabb",
"output": "ababbbabb"
},
{
"input": "aaabaa",
"output": "aaabaa"
},
{
"input": "bababa",
"output": "bababa"
},
{
"input": "baabbbbaaa",
... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000003 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.upper()
s = s.replace('B', 'baaa')
s = s.replace('AAba', 'aa')
s = s.replace('aAa', 'aabb')
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"B",
"baaa"
]
},
{
"method": "replace",
"args": [
"AAba",
"aa"
]
},
{
"method": "replace",
"args": [
"aAa",
"aabb... | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('baaabaab') == 'baaaabbaaaaaaa'
assert candidate('bbbaa') == 'baaabaaabaaaAA'
assert candidate('aaabbababa') == 'AaaaabaaaAbaaaAbaaaA'
assert candidate('bbaabbbbb') == 'baaaba... | 40 | [
{
"input": "baaabaab",
"output": "baaaabbaaaaaaa"
},
{
"input": "bbbaa",
"output": "baaabaaabaaaAA"
},
{
"input": "aaabbababa",
"output": "AaaaabaaaAbaaaAbaaaA"
},
{
"input": "bbaabbbbb",
"output": "baaabaaaaaaabaaabaaabaaabaaa"
},
{
"input": "b",
"output": "b... | [
{
"input": "ba",
"output": "baaaA"
},
{
"input": "abbabbaa",
"output": "AbaaabaaaAbaaabaaaAA"
},
{
"input": "aaaaab",
"output": "AAAaaaa"
},
{
"input": "b",
"output": "baaa"
},
{
"input": "bbaaabbbb",
"output": "baaabaaaabbaaabaaabaaabaaa"
},
{
"input"... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000004 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
s = s.replace('babab', 'aab')
s = s.replace('ab', 'a')
s = s.upper()
return s
| [
{
"method": "lower",
"args": []
},
{
"method": "replace",
"args": [
"babab",
"aab"
]
},
{
"method": "replace",
"args": [
"ab",
"a"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abb') == 'AB'
assert candidate('bababab') == 'AAA'
assert candidate('bbbbaabb') == 'BBBBAAB'
assert candidate('abba') == 'ABA'
assert candidate('aabbbbb') == 'AABBBB'
... | 40 | [
{
"input": "abb",
"output": "AB"
},
{
"input": "bababab",
"output": "AAA"
},
{
"input": "bbbbaabb",
"output": "BBBBAAB"
},
{
"input": "abba",
"output": "ABA"
},
{
"input": "aabbbbb",
"output": "AABBBB"
},
{
"input": "bbbabbaa",
"output": "BBBABAA"
... | [
{
"input": "baaaaba",
"output": "BAAAAA"
},
{
"input": "bbabaabbba",
"output": "BBAAABBA"
},
{
"input": "abbabbbbb",
"output": "ABABBBB"
},
{
"input": "bba",
"output": "BBA"
},
{
"input": "baabababb",
"output": "BAAAAB"
},
{
"input": "ababababb",
"... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 4,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000005 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.replace('ABBB', 'bba')
s = s.replace('AAb', 'ba')
s = s.lower()
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"ABBB",
"bba"
]
},
{
"method": "replace",
"args": [
"AAb",
"ba"
]
},
{
"method": "lower",
"args": []
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('baaababb') == 'BAAABABB'
assert candidate('baabbba') == 'BABBAA'
assert candidate('bbbaa') == 'BBBAA'
assert candidate('aa') == 'AA'
assert candidate('abbbab') == 'BBAAB'... | 40 | [
{
"input": "baaababb",
"output": "BAAABABB"
},
{
"input": "baabbba",
"output": "BABBAA"
},
{
"input": "bbbaa",
"output": "BBBAA"
},
{
"input": "aa",
"output": "AA"
},
{
"input": "abbbab",
"output": "BBAAB"
},
{
"input": "ababb",
"output": "ABABB"
... | [
{
"input": "bbbbaaa",
"output": "BBBBAAA"
},
{
"input": "baba",
"output": "BABA"
},
{
"input": "babbaabba",
"output": "BABBAABBA"
},
{
"input": "abaababb",
"output": "ABAABABB"
},
{
"input": "abaaab",
"output": "ABAAAB"
},
{
"input": "baaaaabbab",
... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000006 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
return s
| [
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbab') == 'bbab'
assert candidate('abbb') == 'abbb'
assert candidate('bbaaaa') == 'bbaaaa'
assert candidate('aaa') == 'aaa'
assert candidate('ababaaaaaa') == 'ababaaaaaa'... | 40 | [
{
"input": "bbab",
"output": "bbab"
},
{
"input": "abbb",
"output": "abbb"
},
{
"input": "bbaaaa",
"output": "bbaaaa"
},
{
"input": "aaa",
"output": "aaa"
},
{
"input": "ababaaaaaa",
"output": "ababaaaaaa"
},
{
"input": "babb",
"output": "babb"
}... | [
{
"input": "bbbaa",
"output": "bbbaa"
},
{
"input": "babaa",
"output": "babaa"
},
{
"input": "abbbbbbbb",
"output": "abbbbbbbb"
},
{
"input": "aba",
"output": "aba"
},
{
"input": "b",
"output": "b"
},
{
"input": "b",
"output": "b"
},
{
"inp... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000007 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('bb', 'bbaab')
s = s.upper()
return s
| [
{
"method": "replace",
"args": [
"bb",
"bbaab"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bab') == 'BAB'
assert candidate('abbabaaaba') == 'ABBAABABAAABA'
assert candidate('a') == 'A'
assert candidate('bbbb') == 'BBAABBBAAB'
assert candidate('aaaabbaaba') == '... | 40 | [
{
"input": "bab",
"output": "BAB"
},
{
"input": "abbabaaaba",
"output": "ABBAABABAAABA"
},
{
"input": "a",
"output": "A"
},
{
"input": "bbbb",
"output": "BBAABBBAAB"
},
{
"input": "aaaabbaaba",
"output": "AAAABBAABAABA"
},
{
"input": "b",
"output":... | [
{
"input": "ab",
"output": "AB"
},
{
"input": "bbbb",
"output": "BBAABBBAAB"
},
{
"input": "bbaba",
"output": "BBAABABA"
},
{
"input": "abaabbbaaa",
"output": "ABAABBAABBAAA"
},
{
"input": "bbba",
"output": "BBAABBA"
},
{
"input": "aabbab",
"output... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000008 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('bbab', 'aab')
s = s.upper()
s = s.upper()
s = s.upper()
s = s.lower()
return s
| [
{
"method": "replace",
"args": [
"bbab",
"aab"
]
},
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbaa') == 'bbaa'
assert candidate('bbbbaa') == 'bbbbaa'
assert candidate('aabbaba') == 'aaaaba'
assert candidate('baba') == 'baba'
assert candidate('abababbbba') == 'abab... | 40 | [
{
"input": "bbaa",
"output": "bbaa"
},
{
"input": "bbbbaa",
"output": "bbbbaa"
},
{
"input": "aabbaba",
"output": "aaaaba"
},
{
"input": "baba",
"output": "baba"
},
{
"input": "abababbbba",
"output": "abababbbba"
},
{
"input": "abbbaaa",
"output": ... | [
{
"input": "abaaa",
"output": "abaaa"
},
{
"input": "aaaabaaba",
"output": "aaaabaaba"
},
{
"input": "abb",
"output": "abb"
},
{
"input": "a",
"output": "a"
},
{
"input": "aa",
"output": "aa"
},
{
"input": "aabbb",
"output": "aabbb"
},
{
"i... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000009 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
return s
| [
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('baaabaaab') == 'baaabaaab'
assert candidate('aab') == 'aab'
assert candidate('abbbbb') == 'abbbbb'
assert candidate('aabaaaabbb') == 'aabaaaabbb'
assert candidate('baabba... | 40 | [
{
"input": "baaabaaab",
"output": "baaabaaab"
},
{
"input": "aab",
"output": "aab"
},
{
"input": "abbbbb",
"output": "abbbbb"
},
{
"input": "aabaaaabbb",
"output": "aabaaaabbb"
},
{
"input": "baabba",
"output": "baabba"
},
{
"input": "bba",
"output... | [
{
"input": "abbaaaba",
"output": "abbaaaba"
},
{
"input": "bbabab",
"output": "bbabab"
},
{
"input": "bbabbabb",
"output": "bbabbabb"
},
{
"input": "bbbaaa",
"output": "bbbaaa"
},
{
"input": "ba",
"output": "ba"
},
{
"input": "bbaaabaab",
"output":... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000010 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('aaaab', 'aaabb')
s = s.lower()
s = s.lower()
s = s.upper()
s = s.upper()
return s
| [
{
"method": "replace",
"args": [
"aaaab",
"aaabb"
]
},
{
"method": "lower",
"args": []
},
{
"method": "lower",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('ababbb') == 'ABABBB'
assert candidate('ba') == 'BA'
assert candidate('baaab') == 'BAAAB'
assert candidate('aabbbbbbaa') == 'AABBBBBBAA'
assert candidate('aabab') == 'AABA... | 40 | [
{
"input": "ababbb",
"output": "ABABBB"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "baaab",
"output": "BAAAB"
},
{
"input": "aabbbbbbaa",
"output": "AABBBBBBAA"
},
{
"input": "aabab",
"output": "AABAB"
},
{
"input": "b",
"output": "B"
},
... | [
{
"input": "abababa",
"output": "ABABABA"
},
{
"input": "abb",
"output": "ABB"
},
{
"input": "aabbbaabab",
"output": "AABBBAABAB"
},
{
"input": "abbabbaaba",
"output": "ABBABBAABA"
},
{
"input": "baaaabbb",
"output": "BAAABBBB"
},
{
"input": "aabbbbabb... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000011 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('b', 'bbaab')
s = s.lower()
s = s.upper()
s = s.upper()
s = s.replace('AAABB', 'baabb')
return s
| [
{
"method": "replace",
"args": [
"b",
"bbaab"
]
},
{
"method": "lower",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"AAABB",
"baabb"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('babba') == 'BBAABABBAABBBAABA'
assert candidate('aaaaab') == 'AAbaabbAAB'
assert candidate('abbba') == 'ABBAABBBAABBBAABA'
assert candidate('aaabaa') == 'baabbAABAA'
asse... | 40 | [
{
"input": "babba",
"output": "BBAABABBAABBBAABA"
},
{
"input": "aaaaab",
"output": "AAbaabbAAB"
},
{
"input": "abbba",
"output": "ABBAABBBAABBBAABA"
},
{
"input": "aaabaa",
"output": "baabbAABAA"
},
{
"input": "b",
"output": "BBAAB"
},
{
"input": "abb... | [
{
"input": "aa",
"output": "AA"
},
{
"input": "b",
"output": "BBAAB"
},
{
"input": "aabaabb",
"output": "AABBAABAABBAABBBAAB"
},
{
"input": "a",
"output": "A"
},
{
"input": "bababaabb",
"output": "BBAABABBAABABBAABAABBAABBBAAB"
},
{
"input": "bbabaabaa... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000012 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('aba', 'baaba')
return s
| [
{
"method": "replace",
"args": [
"aba",
"baaba"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bb') == 'bb'
assert candidate('aababaaa') == 'abaababaaa'
assert candidate('aaabb') == 'aaabb'
assert candidate('bbabaaba') == 'bbbaababaaba'
assert candidate('ab') == 'a... | 40 | [
{
"input": "bb",
"output": "bb"
},
{
"input": "aababaaa",
"output": "abaababaaa"
},
{
"input": "aaabb",
"output": "aaabb"
},
{
"input": "bbabaaba",
"output": "bbbaababaaba"
},
{
"input": "ab",
"output": "ab"
},
{
"input": "babba",
"output": "babba"... | [
{
"input": "abaaa",
"output": "baabaaa"
},
{
"input": "ba",
"output": "ba"
},
{
"input": "ab",
"output": "ab"
},
{
"input": "bbaaba",
"output": "bbabaaba"
},
{
"input": "a",
"output": "a"
},
{
"input": "aababa",
"output": "abaababa"
},
{
"i... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000013 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('aababaaa') == 'AABABAAA'
assert candidate('b') == 'B'
assert candidate('bbb') == 'BBB'
assert candidate('abbbaaabba') == 'ABBBAAABBA'
assert candidate('abbaaaabaa') == 'A... | 40 | [
{
"input": "aababaaa",
"output": "AABABAAA"
},
{
"input": "b",
"output": "B"
},
{
"input": "bbb",
"output": "BBB"
},
{
"input": "abbbaaabba",
"output": "ABBBAAABBA"
},
{
"input": "abbaaaabaa",
"output": "ABBAAAABAA"
},
{
"input": "a",
"output": "A"... | [
{
"input": "babab",
"output": "BABAB"
},
{
"input": "aab",
"output": "AAB"
},
{
"input": "abaabbbb",
"output": "ABAABBBB"
},
{
"input": "b",
"output": "B"
},
{
"input": "aaaaa",
"output": "AAAAA"
},
{
"input": "bbbbbabaa",
"output": "BBBBBABAA"
}... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000014 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
return s
| [
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('baaba') == 'baaba'
assert candidate('bb') == 'bb'
assert candidate('aaaa') == 'aaaa'
assert candidate('babbbba') == 'babbbba'
assert candidate('baaaa') == 'baaaa'
ass... | 40 | [
{
"input": "baaba",
"output": "baaba"
},
{
"input": "bb",
"output": "bb"
},
{
"input": "aaaa",
"output": "aaaa"
},
{
"input": "babbbba",
"output": "babbbba"
},
{
"input": "baaaa",
"output": "baaaa"
},
{
"input": "b",
"output": "b"
},
{
"inp... | [
{
"input": "aa",
"output": "aa"
},
{
"input": "bbbab",
"output": "bbbab"
},
{
"input": "babbbabab",
"output": "babbbabab"
},
{
"input": "bbaaaabb",
"output": "bbaaaabb"
},
{
"input": "baabb",
"output": "baabb"
},
{
"input": "b",
"output": "b"
},
... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000015 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
return s
| [
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('ba') == 'ba'
assert candidate('b') == 'b'
assert candidate('aaabaababa') == 'aaabaababa'
assert candidate('bbbbbab') == 'bbbbbab'
assert candidate('baabbaa') == 'baabbaa'... | 40 | [
{
"input": "ba",
"output": "ba"
},
{
"input": "b",
"output": "b"
},
{
"input": "aaabaababa",
"output": "aaabaababa"
},
{
"input": "bbbbbab",
"output": "bbbbbab"
},
{
"input": "baabbaa",
"output": "baabbaa"
},
{
"input": "bbbbabba",
"output": "bbbba... | [
{
"input": "babaabbbba",
"output": "babaabbbba"
},
{
"input": "bbbaaabb",
"output": "bbbaaabb"
},
{
"input": "abbbabbbb",
"output": "abbbabbbb"
},
{
"input": "a",
"output": "a"
},
{
"input": "abbba",
"output": "abbba"
},
{
"input": "abbabbbbb",
"ou... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000016 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('aaabb', 'abbb')
s = s.replace('abaa', 'bb')
return s
| [
{
"method": "replace",
"args": [
"aaabb",
"abbb"
]
},
{
"method": "replace",
"args": [
"abaa",
"bb"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abbababbba') == 'abbababbba'
assert candidate('bab') == 'bab'
assert candidate('babbaabaab') == 'babbabbb'
assert candidate('bb') == 'bb'
assert candidate('bb') == 'bb'
... | 40 | [
{
"input": "abbababbba",
"output": "abbababbba"
},
{
"input": "bab",
"output": "bab"
},
{
"input": "babbaabaab",
"output": "babbabbb"
},
{
"input": "bb",
"output": "bb"
},
{
"input": "bb",
"output": "bb"
},
{
"input": "b",
"output": "b"
},
{
... | [
{
"input": "bbaaabbaba",
"output": "bbabbbaba"
},
{
"input": "abba",
"output": "abba"
},
{
"input": "ba",
"output": "ba"
},
{
"input": "bbab",
"output": "bbab"
},
{
"input": "aaababba",
"output": "aaababba"
},
{
"input": "aaaaaabab",
"output": "aaa... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000017 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.replace('BBABB', 'abaa')
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"BBABB",
"abaa"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('baab') == 'BAAB'
assert candidate('aaabbbaab') == 'AAABBBAAB'
assert candidate('aabbabaaa') == 'AABBABAAA'
assert candidate('ababbbbbab') == 'ABABBBBBAB'
assert candidate... | 40 | [
{
"input": "baab",
"output": "BAAB"
},
{
"input": "aaabbbaab",
"output": "AAABBBAAB"
},
{
"input": "aabbabaaa",
"output": "AABBABAAA"
},
{
"input": "ababbbbbab",
"output": "ABABBBBBAB"
},
{
"input": "a",
"output": "A"
},
{
"input": "aaaabb",
"outpu... | [
{
"input": "bab",
"output": "BAB"
},
{
"input": "abbbbaabbb",
"output": "ABBBBAABBB"
},
{
"input": "babaa",
"output": "BABAA"
},
{
"input": "bbbaabaaab",
"output": "BBBAABAAAB"
},
{
"input": "baabbabaa",
"output": "BAABBABAA"
},
{
"input": "bbbabaaba",... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000018 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('aba', 'bb')
return s
| [
{
"method": "replace",
"args": [
"aba",
"bb"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('babbbbaab') == 'babbbbaab'
assert candidate('abbbbbbbb') == 'abbbbbbbb'
assert candidate('b') == 'b'
assert candidate('a') == 'a'
assert candidate('bbbaabaaa') == 'bbbabb... | 40 | [
{
"input": "babbbbaab",
"output": "babbbbaab"
},
{
"input": "abbbbbbbb",
"output": "abbbbbbbb"
},
{
"input": "b",
"output": "b"
},
{
"input": "a",
"output": "a"
},
{
"input": "bbbaabaaa",
"output": "bbbabbaa"
},
{
"input": "aaa",
"output": "aaa"
... | [
{
"input": "aab",
"output": "aab"
},
{
"input": "a",
"output": "a"
},
{
"input": "bbabba",
"output": "bbabba"
},
{
"input": "bab",
"output": "bab"
},
{
"input": "abbb",
"output": "abbb"
},
{
"input": "baababaaa",
"output": "babbbaaa"
},
{
"... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000019 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.replace('BAB', 'ab')
s = s.replace('Aab', 'bbab')
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"BAB",
"ab"
]
},
{
"method": "replace",
"args": [
"Aab",
"bbab"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbbaa') == 'BBBAA'
assert candidate('bababaab') == 'ABABAAB'
assert candidate('ba') == 'BA'
assert candidate('bbaaba') == 'BBAABA'
assert candidate('aaaaaa') == 'AAAAAA'
... | 40 | [
{
"input": "bbbaa",
"output": "BBBAA"
},
{
"input": "bababaab",
"output": "ABABAAB"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "bbaaba",
"output": "BBAABA"
},
{
"input": "aaaaaa",
"output": "AAAAAA"
},
{
"input": "bbaaabbabb",
"output": "BBAA... | [
{
"input": "ababa",
"output": "BBABA"
},
{
"input": "aaaaaabab",
"output": "AAAAABBAB"
},
{
"input": "abaa",
"output": "ABAA"
},
{
"input": "ab",
"output": "AB"
},
{
"input": "baabbba",
"output": "BAABBBA"
},
{
"input": "bababbbbb",
"output": "ABAB... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 4,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000020 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
s = s.lower()
s = s.upper()
s = s.upper()
s = s.replace('ABAA', 'bab')
return s
| [
{
"method": "lower",
"args": []
},
{
"method": "lower",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"ABAA",
"bab"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abbbabb') == 'ABBBABB'
assert candidate('bbb') == 'BBB'
assert candidate('aaabaa') == 'AAbab'
assert candidate('aaabba') == 'AAABBA'
assert candidate('aab') == 'AAB'
... | 40 | [
{
"input": "abbbabb",
"output": "ABBBABB"
},
{
"input": "bbb",
"output": "BBB"
},
{
"input": "aaabaa",
"output": "AAbab"
},
{
"input": "aaabba",
"output": "AAABBA"
},
{
"input": "aab",
"output": "AAB"
},
{
"input": "bbbabaaa",
"output": "BBBbabA"
... | [
{
"input": "ab",
"output": "AB"
},
{
"input": "baabaaaaab",
"output": "BAbabAAAB"
},
{
"input": "aaab",
"output": "AAAB"
},
{
"input": "ab",
"output": "AB"
},
{
"input": "a",
"output": "A"
},
{
"input": "ababbb",
"output": "ABABBB"
},
{
"in... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000021 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('a', 'ab')
s = s.replace('bbba', 'bbaaa')
s = s.upper()
return s
| [
{
"method": "replace",
"args": [
"a",
"ab"
]
},
{
"method": "replace",
"args": [
"bbba",
"bbaaa"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abbabaa') == 'ABBAAABBABAB'
assert candidate('abaaaabaa') == 'ABBABABABABBABAB'
assert candidate('a') == 'AB'
assert candidate('baba') == 'BABBAB'
assert candidate('baba'... | 40 | [
{
"input": "abbabaa",
"output": "ABBAAABBABAB"
},
{
"input": "abaaaabaa",
"output": "ABBABABABABBABAB"
},
{
"input": "a",
"output": "AB"
},
{
"input": "baba",
"output": "BABBAB"
},
{
"input": "baba",
"output": "BABBAB"
},
{
"input": "aabaaaab",
"ou... | [
{
"input": "abbbbaaabb",
"output": "ABBBBAAABABABBB"
},
{
"input": "b",
"output": "B"
},
{
"input": "aababba",
"output": "ABABBABBAAAB"
},
{
"input": "abaabbabaa",
"output": "ABBABABBAAABBABAB"
},
{
"input": "aababb",
"output": "ABABBABBB"
},
{
"input"... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 3,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000022 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.replace('A', 'baaab')
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"A",
"baaab"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('ab') == 'baaabB'
assert candidate('babba') == 'BbaaabBBbaaab'
assert candidate('bbbbba') == 'BBBBBbaaab'
assert candidate('bab') == 'BbaaabB'
assert candidate('b') == 'B'... | 40 | [
{
"input": "ab",
"output": "baaabB"
},
{
"input": "babba",
"output": "BbaaabBBbaaab"
},
{
"input": "bbbbba",
"output": "BBBBBbaaab"
},
{
"input": "bab",
"output": "BbaaabB"
},
{
"input": "b",
"output": "B"
},
{
"input": "bbaaab",
"output": "BBbaaab... | [
{
"input": "a",
"output": "baaab"
},
{
"input": "aaaaababba",
"output": "baaabbaaabbaaabbaaabbaaabBbaaabBBbaaab"
},
{
"input": "bb",
"output": "BB"
},
{
"input": "aabbabaa",
"output": "baaabbaaabBBbaaabBbaaabbaaab"
},
{
"input": "aaa",
"output": "baaabbaaabbaa... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000023 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('aaaba', 'baaab')
s = s.upper()
return s
| [
{
"method": "replace",
"args": [
"aaaba",
"baaab"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbaabbbba') == 'BBAABBBBA'
assert candidate('bababbabb') == 'BABABBABB'
assert candidate('bbb') == 'BBB'
assert candidate('aabbb') == 'AABBB'
assert candidate('baaabab') ... | 40 | [
{
"input": "bbaabbbba",
"output": "BBAABBBBA"
},
{
"input": "bababbabb",
"output": "BABABBABB"
},
{
"input": "bbb",
"output": "BBB"
},
{
"input": "aabbb",
"output": "AABBB"
},
{
"input": "baaabab",
"output": "BBAAABB"
},
{
"input": "babbbbaabb",
"o... | [
{
"input": "bbbbbb",
"output": "BBBBBB"
},
{
"input": "aababaaaab",
"output": "AABABAAAAB"
},
{
"input": "babaabaaa",
"output": "BABAABAAA"
},
{
"input": "baabbbbaba",
"output": "BAABBBBABA"
},
{
"input": "ababba",
"output": "ABABBA"
},
{
"input": "bbb... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000024 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
return s
| [
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('a') == 'a'
assert candidate('bbbbaabbbb') == 'bbbbaabbbb'
assert candidate('bbaabbaaa') == 'bbaabbaaa'
assert candidate('bbbbbb') == 'bbbbbb'
assert candidate('aabbab') =... | 40 | [
{
"input": "a",
"output": "a"
},
{
"input": "bbbbaabbbb",
"output": "bbbbaabbbb"
},
{
"input": "bbaabbaaa",
"output": "bbaabbaaa"
},
{
"input": "bbbbbb",
"output": "bbbbbb"
},
{
"input": "aabbab",
"output": "aabbab"
},
{
"input": "b",
"output": "b"... | [
{
"input": "bbbabaaba",
"output": "bbbabaaba"
},
{
"input": "baabaa",
"output": "baabaa"
},
{
"input": "aaabb",
"output": "aaabb"
},
{
"input": "ab",
"output": "ab"
},
{
"input": "aababaabbb",
"output": "aababaabbb"
},
{
"input": "bbbbaaaaab",
"out... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000025 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.lower()
s = s.replace('bbaaa', 'babb')
s = s.lower()
s = s.lower()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "lower",
"args": []
},
{
"method": "replace",
"args": [
"bbaaa",
"babb"
]
},
{
"method": "lower",
"args": []
},
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('aababab') == 'aababab'
assert candidate('ababbbb') == 'ababbbb'
assert candidate('aaaab') == 'aaaab'
assert candidate('abb') == 'abb'
assert candidate('bbaababa') == 'bba... | 40 | [
{
"input": "aababab",
"output": "aababab"
},
{
"input": "ababbbb",
"output": "ababbbb"
},
{
"input": "aaaab",
"output": "aaaab"
},
{
"input": "abb",
"output": "abb"
},
{
"input": "bbaababa",
"output": "bbaababa"
},
{
"input": "bbab",
"output": "bba... | [
{
"input": "aa",
"output": "aa"
},
{
"input": "bbb",
"output": "bbb"
},
{
"input": "babaab",
"output": "babaab"
},
{
"input": "aaabab",
"output": "aaabab"
},
{
"input": "bbaab",
"output": "bbaab"
},
{
"input": "ba",
"output": "ba"
},
{
"inp... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000026 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.upper()
s = s.replace('ABABA', 'ab')
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"ABABA",
"ab"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('aababa') == 'AAB'
assert candidate('ba') == 'BA'
assert candidate('b') == 'B'
assert candidate('aabbaaaa') == 'AABBAAAA'
assert candidate('aaabaabbbb') == 'AAABAABBBB'
... | 40 | [
{
"input": "aababa",
"output": "AAB"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "b",
"output": "B"
},
{
"input": "aabbaaaa",
"output": "AABBAAAA"
},
{
"input": "aaabaabbbb",
"output": "AAABAABBBB"
},
{
"input": "aabaabaaa",
"output": "AABAABA... | [
{
"input": "baabaa",
"output": "BAABAA"
},
{
"input": "abbbaaab",
"output": "ABBBAAAB"
},
{
"input": "baabba",
"output": "BAABBA"
},
{
"input": "bbabbaaa",
"output": "BBABBAAA"
},
{
"input": "bbbaaba",
"output": "BBBAABA"
},
{
"input": "babbbbaaaa",
... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 4,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000027 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('ab') == 'AB'
assert candidate('abba') == 'ABBA'
assert candidate('babbabbbaa') == 'BABBABBBAA'
assert candidate('aababbaaba') == 'AABABBAABA'
assert candidate('aaba') == ... | 40 | [
{
"input": "ab",
"output": "AB"
},
{
"input": "abba",
"output": "ABBA"
},
{
"input": "babbabbbaa",
"output": "BABBABBBAA"
},
{
"input": "aababbaaba",
"output": "AABABBAABA"
},
{
"input": "aaba",
"output": "AABA"
},
{
"input": "baab",
"output": "BAA... | [
{
"input": "abbaab",
"output": "ABBAAB"
},
{
"input": "bababb",
"output": "BABABB"
},
{
"input": "bbbaab",
"output": "BBBAAB"
},
{
"input": "a",
"output": "A"
},
{
"input": "bbab",
"output": "BBAB"
},
{
"input": "aaaabbabbb",
"output": "AAAABBABBB"... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000028 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abbbbbab') == 'ABBBBBAB'
assert candidate('abbb') == 'ABBB'
assert candidate('aaaaaaba') == 'AAAAAABA'
assert candidate('aaabba') == 'AAABBA'
assert candidate('aa') == 'A... | 40 | [
{
"input": "abbbbbab",
"output": "ABBBBBAB"
},
{
"input": "abbb",
"output": "ABBB"
},
{
"input": "aaaaaaba",
"output": "AAAAAABA"
},
{
"input": "aaabba",
"output": "AAABBA"
},
{
"input": "aa",
"output": "AA"
},
{
"input": "baabba",
"output": "BAABB... | [
{
"input": "abbbbbab",
"output": "ABBBBBAB"
},
{
"input": "baababbab",
"output": "BAABABBAB"
},
{
"input": "b",
"output": "B"
},
{
"input": "aabba",
"output": "AABBA"
},
{
"input": "ababbbb",
"output": "ABABBBB"
},
{
"input": "bbbbbbba",
"output": ... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000029 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.replace('AB', 'bba')
s = s.replace('ba', 'abaab')
s = s.lower()
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"AB",
"bba"
]
},
{
"method": "replace",
"args": [
"ba",
"abaab"
]
},
{
"method": "lower",
"args": []
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbbbbaab') == 'BBBBBABABAAB'
assert candidate('aaaaabaabb') == 'AAAABABAABABABAABB'
assert candidate('bababaab') == 'BBABAABBABAABABABAAB'
assert candidate('b') == 'B'
as... | 40 | [
{
"input": "bbbbbaab",
"output": "BBBBBABABAAB"
},
{
"input": "aaaaabaabb",
"output": "AAAABABAABABABAABB"
},
{
"input": "bababaab",
"output": "BBABAABBABAABABABAAB"
},
{
"input": "b",
"output": "B"
},
{
"input": "aaa",
"output": "AAA"
},
{
"input": "a... | [
{
"input": "aabaa",
"output": "ABABAABAA"
},
{
"input": "b",
"output": "B"
},
{
"input": "bbabbabbb",
"output": "BBBABAABBBABAABBB"
},
{
"input": "bab",
"output": "BBABAAB"
},
{
"input": "aaabaa",
"output": "AABABAABAA"
},
{
"input": "aaa",
"output... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000030 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.replace('BABB', 'a')
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"BABB",
"a"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbab') == 'BBAB'
assert candidate('baabbbaa') == 'BAABBBAA'
assert candidate('bbababa') == 'BBABABA'
assert candidate('aab') == 'AAB'
assert candidate('baaaabbb') == 'BAA... | 40 | [
{
"input": "bbab",
"output": "BBAB"
},
{
"input": "baabbbaa",
"output": "BAABBBAA"
},
{
"input": "bbababa",
"output": "BBABABA"
},
{
"input": "aab",
"output": "AAB"
},
{
"input": "baaaabbb",
"output": "BAAAABBB"
},
{
"input": "abbbababa",
"output":... | [
{
"input": "bab",
"output": "BAB"
},
{
"input": "a",
"output": "A"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "ababa",
"output": "ABABA"
},
{
"input": "bbba",
"output": "BBBA"
},
{
"input": "ab",
"output": "AB"
},
{
"input": "aaaaabaa... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 3,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000031 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('a', 'abb')
s = s.upper()
return s
| [
{
"method": "replace",
"args": [
"a",
"abb"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('aababa') == 'ABBABBBABBBABB'
assert candidate('aba') == 'ABBBABB'
assert candidate('ba') == 'BABB'
assert candidate('aaaaaa') == 'ABBABBABBABBABBABB'
assert candidate('aa... | 40 | [
{
"input": "aababa",
"output": "ABBABBBABBBABB"
},
{
"input": "aba",
"output": "ABBBABB"
},
{
"input": "ba",
"output": "BABB"
},
{
"input": "aaaaaa",
"output": "ABBABBABBABBABBABB"
},
{
"input": "aabbbbb",
"output": "ABBABBBBBBB"
},
{
"input": "abbab",... | [
{
"input": "bbbbbba",
"output": "BBBBBBABB"
},
{
"input": "abbbaaabb",
"output": "ABBBBBABBABBABBBB"
},
{
"input": "baaaabbb",
"output": "BABBABBABBABBBBB"
},
{
"input": "aaba",
"output": "ABBABBBABB"
},
{
"input": "aba",
"output": "ABBBABB"
},
{
"inpu... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000032 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
s = s.replace('baab', 'bb')
return s
| [
{
"method": "lower",
"args": []
},
{
"method": "replace",
"args": [
"baab",
"bb"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('a') == 'a'
assert candidate('babbbaba') == 'babbbaba'
assert candidate('b') == 'b'
assert candidate('baa') == 'baa'
assert candidate('bbb') == 'bbb'
assert candidate(... | 40 | [
{
"input": "a",
"output": "a"
},
{
"input": "babbbaba",
"output": "babbbaba"
},
{
"input": "b",
"output": "b"
},
{
"input": "baa",
"output": "baa"
},
{
"input": "bbb",
"output": "bbb"
},
{
"input": "ababbbabb",
"output": "ababbbabb"
},
{
"i... | [
{
"input": "ab",
"output": "ab"
},
{
"input": "bbba",
"output": "bbba"
},
{
"input": "ab",
"output": "ab"
},
{
"input": "bba",
"output": "bba"
},
{
"input": "bbaba",
"output": "bbaba"
},
{
"input": "bbbaabba",
"output": "bbbbba"
},
{
"input... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 2,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000033 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('bb', 'bb')
s = s.upper()
s = s.replace('ABBA', 'aaaaa')
return s
| [
{
"method": "replace",
"args": [
"bb",
"bb"
]
},
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"ABBA",
"aaaaa"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abaa') == 'ABAA'
assert candidate('ab') == 'AB'
assert candidate('bababaa') == 'BABABAA'
assert candidate('ba') == 'BA'
assert candidate('bbaa') == 'BBAA'
assert cand... | 40 | [
{
"input": "abaa",
"output": "ABAA"
},
{
"input": "ab",
"output": "AB"
},
{
"input": "bababaa",
"output": "BABABAA"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "bbaa",
"output": "BBAA"
},
{
"input": "babaaabbbb",
"output": "BABAAABBBB"
},
... | [
{
"input": "baaaaab",
"output": "BAAAAAB"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "babbaa",
"output": "BaaaaaA"
},
{
"input": "a",
"output": "A"
},
{
"input": "a",
"output": "A"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "aaa... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 3,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000034 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.lower()
s = s.replace('ba', 'aabba')
s = s.replace('bb', 'abb')
s = s.replace('b', 'bbaab')
return s
| [
{
"method": "lower",
"args": []
},
{
"method": "replace",
"args": [
"ba",
"aabba"
]
},
{
"method": "replace",
"args": [
"bb",
"abb"
]
},
{
"method": "replace",
"args": [
"b",
"bbaab"
]
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbbbaaba') == 'abbaabbbaabbbaabaaabbaabbbaabaaaaabbaabbbaaba'
assert candidate('baaabaabab') == 'aaabbaabbbaabaaaaaabbaabbbaabaaaaabbaabbbaababbaab'
assert candidate('abaaaabb') ... | 40 | [
{
"input": "bbbbaaba",
"output": "abbaabbbaabbbaabaaabbaabbbaabaaaaabbaabbbaaba"
},
{
"input": "baaabaabab",
"output": "aaabbaabbbaabaaaaaabbaabbbaabaaaaabbaabbbaababbaab"
},
{
"input": "abaaaabb",
"output": "aaaabbaabbbaabaaaaabbaabbbaab"
},
{
"input": "a",
"output": "a"... | [
{
"input": "aabbaaa",
"output": "aabbaabaaabbaabbbaabaaa"
},
{
"input": "aaabbbaa",
"output": "aaaabbaabbbaabaaabbaabbbaabaa"
},
{
"input": "ba",
"output": "aaabbaabbbaaba"
},
{
"input": "aa",
"output": "aa"
},
{
"input": "baaabababa",
"output": "aaabbaabbbaab... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 4,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000035 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.replace('aaaa', 'ababb')
s = s.lower()
s = s.lower()
s = s.replace('aaaba', 'baa')
s = s.upper()
return s
| [
{
"method": "replace",
"args": [
"aaaa",
"ababb"
]
},
{
"method": "lower",
"args": []
},
{
"method": "lower",
"args": []
},
{
"method": "replace",
"args": [
"aaaba",
"baa"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('babbaaaaa') == 'BABBABABBA'
assert candidate('ab') == 'AB'
assert candidate('baabaaba') == 'BAABAABA'
assert candidate('baaaabaabb') == 'BABABBBAABB'
assert candidate('ba... | 40 | [
{
"input": "babbaaaaa",
"output": "BABBABABBA"
},
{
"input": "ab",
"output": "AB"
},
{
"input": "baabaaba",
"output": "BAABAABA"
},
{
"input": "baaaabaabb",
"output": "BABABBBAABB"
},
{
"input": "babbaabbb",
"output": "BABBAABBB"
},
{
"input": "abaabab... | [
{
"input": "aba",
"output": "ABA"
},
{
"input": "bb",
"output": "BB"
},
{
"input": "a",
"output": "A"
},
{
"input": "a",
"output": "A"
},
{
"input": "a",
"output": "A"
},
{
"input": "baaaa",
"output": "BABABB"
},
{
"input": "abb",
"outp... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 5,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000036 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.replace('ABAB', 'babb')
s = s.replace('bBA', 'baa')
s = s.upper()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "replace",
"args": [
"ABAB",
"babb"
]
},
{
"method": "replace",
"args": [
"bBA",
"baa"
]
},
{
"method": "upper",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('abbaaaba') == 'ABBAAABA'
assert candidate('ba') == 'BA'
assert candidate('baababbaaa') == 'BABABBAAAA'
assert candidate('aaaaaabb') == 'AAAAAABB'
assert candidate('aaaabb... | 40 | [
{
"input": "abbaaaba",
"output": "ABBAAABA"
},
{
"input": "ba",
"output": "BA"
},
{
"input": "baababbaaa",
"output": "BABABBAAAA"
},
{
"input": "aaaaaabb",
"output": "AAAAAABB"
},
{
"input": "aaaabbbbb",
"output": "AAAABBBBB"
},
{
"input": "aaa",
"... | [
{
"input": "aaabbaa",
"output": "AAABBAA"
},
{
"input": "aababaaabb",
"output": "ABABBAAABB"
},
{
"input": "aa",
"output": "AA"
},
{
"input": "abaabbbb",
"output": "ABAABBBB"
},
{
"input": "abaaa",
"output": "ABAAA"
},
{
"input": "a",
"output": "A"... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 4,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
pbe-world/000037 | apply_pipeline | from typing import List
def apply_pipeline(s: str) -> str:
"""Apply a fixed string-manipulation pipeline to the input string `s`.
The pipeline consists of several string method calls such as:
s = s.replace(old, new)
s = s.upper()
s = s.lower()
s = s.strip(chars)
... | def apply_pipeline(s: str) -> str:
"""Canonical solution (auto-generated)."""
s = s.upper()
s = s.upper()
s = s.lower()
return s
| [
{
"method": "upper",
"args": []
},
{
"method": "upper",
"args": []
},
{
"method": "lower",
"args": []
}
] | from typing import Callable
def check(candidate: Callable[[str], str]) -> None:
# examples from the prompt
assert candidate('bbabb') == 'bbabb'
assert candidate('bbaba') == 'bbaba'
assert candidate('babbabaabb') == 'babbabaabb'
assert candidate('aabbababaa') == 'aabbababaa'
assert candidate('b'... | 40 | [
{
"input": "bbabb",
"output": "bbabb"
},
{
"input": "bbaba",
"output": "bbaba"
},
{
"input": "babbabaabb",
"output": "babbabaabb"
},
{
"input": "aabbababaa",
"output": "aabbababaa"
},
{
"input": "b",
"output": "b"
},
{
"input": "b",
"output": "b"
... | [
{
"input": "bbb",
"output": "bbb"
},
{
"input": "a",
"output": "a"
},
{
"input": "bbaaaba",
"output": "bbaaaba"
},
{
"input": "aaa",
"output": "aaa"
},
{
"input": "abbbb",
"output": "abbbb"
},
{
"input": "babab",
"output": "babab"
},
{
"inp... | {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 3,
"num_examples": 8,
"num_tests": 32,
"generation_params": {
"n_inputs_for_examples": 32,
"l_min": 1,
"l_max": 10,
"pipeline_L_min": 1,
"pipeline_L_max": 5
},
"split": "test",
"version": "1.0.0"
} |
A synthetic dataset generator for Programming-by-Examples (PBE) tasks focused on string manipulation pipelines. This is a lightly extended version of PBEBench by Naik et al. 2025.
PBE World generates tasks where models must reverse-engineer a sequence of string method calls from input/output examples. Each task consists of:
s.replace(old, new), s.upper(), s.strip(chars))Each line in the output JSONL file contains a single task with the following structure:
{
"task_id": "pbe-world/000000",
"entry_point": "apply_pipeline",
"prompt": "from typing import List\n\ndef apply_pipeline(s: str) -> str:\n \"\"\"Apply a fixed string-manipulation pipeline to the input string `s`.\n \n The pipeline consists of several string method calls such as:\n \n s = s.replace(old, new)\n s = s.upper()\n s = s.lower()\n s = s.strip(chars)\n \n which are always applied in the same fixed order.\n \n Your task is to reverse-engineer this pipeline from the examples\n and implement it.\n \n Example input/output pairs:\n \n >>> apply_pipeline('abbab') == 'aaab'\n >>> apply_pipeline('abbaa') == 'aa'\n >>> apply_pipeline('abaab') == 'baab'\n \"\"\"\n raise NotImplementedError()\n",
"canonical_solution": "def apply_pipeline(s: str) -> str:\n \"\"\"Canonical solution (auto-generated).\"\"\"\n s = s.strip('a')\n s = s.replace('bb', 'aa')\n return s\n",
"canonical_pipeline": [
{
"method": "strip",
"args": [
"a"
]
},
{
"method": "replace",
"args": [
"bb",
"aa"
]
}
],
"test": "from typing import Callable\n\ndef check(candidate: Callable[[str], str]) -> None:\n # examples from the prompt\n assert candidate('abbab') == 'aaab'\n assert candidate('abbaa') == 'aa'\n assert candidate('abaab') == 'baab'\n\n # hidden tests\n assert candidate('ababb') == 'baaa'\n assert candidate('bbbaa') == 'aab'\n assert candidate('bbbab') == 'aabab'\n",
"num_tests": 6,
"examples": [
{
"input": "abbab",
"output": "aaab"
},
{
"input": "abbaa",
"output": "aa"
},
{
"input": "abaab",
"output": "baab"
}
],
"tests": [
{
"input": "ababb",
"output": "baaa"
},
{
"input": "bbbaa",
"output": "aab"
},
{
"input": "bbbab",
"output": "aabab"
}
],
"metadata": {
"alphabet": [
"a",
"b"
],
"alphabet_size": 2,
"num_programs": 1,
"num_examples": 3,
"num_tests": 3,
"generation_params": {
"n_inputs_for_examples": 16,
"l_min": 5,
"l_max": 5,
"pipeline_L_min": 2,
"pipeline_L_max": 2
},
"split": "test",
"version": "1.0.0"
}
}
See schema.json for the complete JSON Schema specification.
If you use this dataset generator in your research, please cite:
@article{naik2024pbebench,
title={PBEBench: A Multi-Step Programming by Examples Reasoning Benchmark inspired by Historical Linguistics},
author={Naik, Atharva and Prakam and Agrawal, Darsh and Mathur, Yash and Kapadnis, Manav and An, Yuwei and Marr, Clayton and Rose, Carolyn and Mortensen, David},
journal={arXiv preprint arXiv:2505.23126},
year={2025}
}
@software{pbeworld2025,
title={PBE World: A Synthetic Dataset Generator for String Manipulation Tasks},
author={},
year={2025},
url={https://github.com/sbdzdz/pbe-world}
}