openevolve icon indicating copy to clipboard operation
openevolve copied to clipboard

Too much apply diff fail

Open xwqsl opened this issue 11 months ago • 2 comments

Currently, openEvolve use the search/replace format for llm to generate patch for code. However, in practice, we found when prompt gets longer and more complex, such a format will cause many apply diff fails, (for example , the search part is not exactly match with the original code ,e.g., missing space, put unnecessary extra comment,...), is there any solutions to deal with such a problem?

xwqsl avatar Dec 12 '25 02:12 xwqsl

You can try with a better model, or a coding variation like gpt-codex. You can set diff_based_evolution as false to let the LLM update the full program.

codelion avatar Dec 12 '25 03:12 codelion

I believe one of the reasons AlphaEvolve used the SEARCH/REPLACE format is because GEMINI handles this particularly well (probably something to do with the fine-tuning step of training). The main benefit of using the SEARCH/REPLACE mode is that in theory it should use less completion tokens, but if that's not an issue I would also recommend just using the full rewrite mode.

HenriqueAssumpcao avatar Dec 16 '25 00:12 HenriqueAssumpcao