[code_review] Investigate automatic prompt engineering to improve prompts
https://www.deeplearning.ai/the-batch/research-summary-automatic-prompt-engineer-ape/
Also related and interesting idea: https://www.reddit.com/r/AutoGPT/comments/12t7bud/comment/jh4oelk/ (given expected input-outputs, improve prompt with evolutionary algorithms to get as many as possible right outputs from inputs).
We can use the field data to improve the generation part or the filtering part.
There are now tools such as https://github.com/hinthornw/promptimizer that we could use for this.
As optimization objective, we could use:
- field data (maximizing accepted and minimizing rejected);
- human comments (but we'd need to curate a dataset of valuable comments);
- synthetic comments from past bugs (see also #4586).
https://github.com/codelion/optillm is also pretty interesting.
And https://github.com/zou-group/textgrad.