Skip to content

Commit 367bb56

Browse files
committed
Update README.md
1 parent 508ffda commit 367bb56

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,14 @@ prompt:
510510
- "Let's enhance this code:"
511511
- "Time to optimize:"
512512
- "Improving the algorithm:"
513+
improvement_suggestion:
514+
- "Here's how we could improve this code:"
515+
- "I suggest the following improvements:"
516+
- "We can enhance this code by:"
513517
```
514518
519+
**How it works:** Place `{greeting}` or `{improvement_suggestion}` placeholders in your templates, and OpenEvolve will randomly choose from the variations for each generation, adding diversity to prompts.
520+
515521
See [prompt examples](examples/llm_prompt_optimization/templates/) for complete template customization.
516522

517523
</details>
@@ -700,15 +706,18 @@ system_message: "Given the successful simulated annealing approach,
700706
focus on parameter tuning and cooling schedules..."
701707
```
702708
703-
**Template Variation:**
709+
**Template Stochasticity:**
704710
705711
```yaml
706712
prompt:
707713
template_dir: "custom_templates/"
708714
use_template_stochasticity: true
709-
system_message: |
710-
# Use multiple greeting variations
711-
[Randomly: "Let's optimize this code:" | "Time to enhance:" | "Improving:"]
715+
template_variations:
716+
greeting:
717+
- "Let's optimize this code:"
718+
- "Time to enhance:"
719+
- "Improving:"
720+
# Then use {greeting} in your templates to get random variations
712721
```
713722

714723
</details>

0 commit comments

Comments
 (0)