Pbe string transformation
Skill siddhu1716/LearnKit/skills/coding/pbe_string_transformation
LIA Labs / Learnkit - "Make your AI agents Learn Improve and Adapt".
npx -y skills add siddhu1716/LearnKit --skill pbe_string_transformationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.1 KB, as published. Nobody here has run it
Programming-by-Example String Transformation
When to use this skill
Solve Programming-by-Example (PBE) tasks by finding an ordered sequence of Python replace(A, B) calls to transform input strings to output strings.
Approach
- Analyze Patterns: Identify character transformations by comparing the exact inputs and outputs.
- Order by Specificity: Place replacements for longer strings first. If you replace a single character first, it may destroy the context needed for replacing longer strings containing that character later (known as bleeding).
- Trace Sequential Execution: Evaluate how the output of the first replace call affects subsequent replace calls (known as feeding).
- Enclose output: Format the final program sequence strictly as a Python list of strings inside a
pythonmarkdown block, e.g.["replace('a', 'b')"].
Known constraints
- Arguments A and B in
replace(A, B)must have length <= 3. - Predicate A must have length >= 1.
- Maximum of 5 programs per sequence.
Examples
Good output pattern
["replace('bc', 'dc')", "replace('ad', 'ed')"]