Skip to content

Different patch formats for increased performance #46

@jvm123

Description

@jvm123

Consider supporting different patch formats

The AlphaEvolve paper suggests to use diff patches that search & replace segments of code, as implemented currently in OpenEvolve.
This format may not be the most ideal for all models (?).

OpenAI trains its models on a line-based diff format: https://fabianhertwig.com/blog/coding-assistants-file-edits/
In the GPT 4.1 prompting cookbook they provide prompts and Python code for applying the patches.

Anthropic uses tools for string replacements, cmp. https://docs.anthropic.com/en/docs/agents-and-tools/tool-use/text-editor-tool#multiple-matches-for-replacement

Visual Studio Code now implements both the OpenAI and the Anthropic formats.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions