Skip to content

Commit 165a77a

Browse files
committed
Update README.md
1 parent 367bb56 commit 165a77a

File tree

1 file changed

+45
-104
lines changed

1 file changed

+45
-104
lines changed

README.md

Lines changed: 45 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Full reproducibility, extensive evaluation pipelines, and scientific rigor built
6464

6565
| 🎯 **Domain** | 📈 **Achievement** | 🔗 **Example** |
6666
|---------------|-------------------|----------------|
67-
| **GPU Optimization** | 2-3x speedup on Apple Silicon | [MLX Metal Kernels](examples/mlx_metal_kernel_opt/) |
67+
| **GPU Optimization** | Hardware-optimized kernel discovery | [MLX Metal Kernels](examples/mlx_metal_kernel_opt/) |
6868
| **Mathematical** | State-of-the-art circle packing (n=26) | [Circle Packing](examples/circle_packing/) |
6969
| **Algorithm Design** | Adaptive sorting algorithms | [Rust Adaptive Sort](examples/rust_adaptive_sort/) |
7070
| **Scientific Computing** | Automated filter design | [Signal Processing](examples/signal_processing/) |
@@ -127,12 +127,7 @@ result = evolve_function(
127127
print(f"Evolved sorting algorithm: {result.best_code}")
128128
```
129129

130-
**Prefer Docker?**
131-
```bash
132-
docker run --rm -v $(pwd):/app ghcr.io/codelion/openevolve:latest \
133-
examples/function_minimization/initial_program.py \
134-
examples/function_minimization/evaluator.py --iterations 100
135-
```
130+
**Prefer Docker?** See the [Installation & Setup](#-installation--setup) section for Docker options.
136131

137132
## 🎬 See It In Action
138133

@@ -207,10 +202,10 @@ OpenEvolve implements a sophisticated **evolutionary coding pipeline** that goes
207202
<details>
208203
<summary><b>🤖 Advanced LLM Integration</b></summary>
209204

210-
- **Test-Time Compute**: Integration with [OptiLLM](https://github.com/codelion/optillm) for MoA and enhanced reasoning
211-
- **Universal API**: Works with OpenAI, Google, local models
212-
- **Plugin Ecosystem**: Support for OptiLLM plugins (readurls, executecode, z3_solver)
205+
- **Universal API**: Works with OpenAI, Google, local models, and proxies
213206
- **Intelligent Ensembles**: Weighted combinations with sophisticated fallback
207+
- **Test-Time Compute**: Enhanced reasoning through proxy systems (see [OptiLLM setup](#llm-provider-setup))
208+
- **Plugin Ecosystem**: Support for advanced reasoning plugins
214209

215210
</details>
216211

@@ -267,11 +262,34 @@ pip install -e ".[dev]"
267262
<summary><b>🐳 Docker</b></summary>
268263

269264
```bash
265+
# Pull the image
270266
docker pull ghcr.io/codelion/openevolve:latest
267+
268+
# Run an example
269+
docker run --rm -v $(pwd):/app ghcr.io/codelion/openevolve:latest \
270+
examples/function_minimization/initial_program.py \
271+
examples/function_minimization/evaluator.py --iterations 100
271272
```
272273

273274
</details>
274275

276+
### Cost Estimation
277+
278+
**Cost depends on your LLM provider and iterations:**
279+
280+
- **o3**: ~$0.15-0.60 per iteration (depending on code size)
281+
- **o3-mini**: ~$0.03-0.12 per iteration (more cost-effective)
282+
- **Gemini-2.5-Pro**: ~$0.08-0.30 per iteration
283+
- **Gemini-2.5-Flash**: ~$0.01-0.05 per iteration (fastest and cheapest)
284+
- **Local models**: Nearly free after setup
285+
- **OptiLLM**: Use cheaper models with test-time compute for better results
286+
287+
**Cost-saving tips:**
288+
- Start with fewer iterations (100-200)
289+
- Use o3-mini, Gemini-2.5-Flash or local models for exploration
290+
- Use cascade evaluation to filter bad programs early
291+
- Configure smaller population sizes initially
292+
275293
### LLM Provider Setup
276294

277295
OpenEvolve works with **any OpenAI-compatible API**:
@@ -347,7 +365,7 @@ llm:
347365
| Project | Domain | Achievement | Demo |
348366
|---------|--------|-------------|------|
349367
| [🎯 **Function Minimization**](examples/function_minimization/) | Optimization | Random → Simulated Annealing | [View Results](examples/function_minimization/openevolve_output/) |
350-
| [⚡ **MLX GPU Kernels**](examples/mlx_metal_kernel_opt/) | Hardware | 2-3x Apple Silicon speedup | [Benchmarks](examples/mlx_metal_kernel_opt/README.md) |
368+
| [⚡ **MLX GPU Kernels**](examples/mlx_metal_kernel_opt/) | Hardware | Apple Silicon optimization | [Benchmarks](examples/mlx_metal_kernel_opt/README.md) |
351369
| [🔄 **Rust Adaptive Sort**](examples/rust_adaptive_sort/) | Algorithms | Data-aware sorting | [Code Evolution](examples/rust_adaptive_sort/) |
352370
| [📐 **Symbolic Regression**](examples/symbolic_regression/) | Science | Automated equation discovery | [LLM-SRBench](examples/symbolic_regression/) |
353371
| [🕸️ **Web Scraper + OptiLLM**](examples/web_scraper_optillm/) | AI Integration | Test-time compute optimization | [Smart Scraping](examples/web_scraper_optillm/) |
@@ -442,11 +460,11 @@ max_iterations: 1000
442460
random_seed: 42 # Full reproducibility
443461

444462
llm:
445-
# Ensemble with test-time compute
463+
# Ensemble configuration
446464
models:
447465
- name: "gemini-2.5-pro"
448466
weight: 0.6
449-
- name: "moa&readurls-o3" # OptiLLM features
467+
- name: "gemini-2.5-flash"
450468
weight: 0.4
451469
temperature: 0.7
452470

@@ -635,109 +653,45 @@ prompt:
635653
<details>
636654
<summary><b>🎨 Prompt Engineering Patterns</b></summary>
637655

638-
**Structure Your Message:**
639-
640-
- Start with role definition ("You are an expert...")
641-
- Define the specific task and context
642-
- List optimization opportunities with examples
643-
- Set clear constraints and safety rules
644-
- End with success criteria
656+
**Structure Your Message:** Start with role definition → Define task/context → List optimization opportunities → Set constraints → Success criteria
645657

646658
**Use Specific Examples:**
647-
648659
```yaml
649-
# Good: Specific optimization targets
650-
system_message: |
651-
Focus on reducing memory allocations in the hot loop.
652-
Example: Replace `new Vector()` with pre-allocated arrays.
653-
654-
# Avoid: Vague guidance
655-
system_message: "Make the code faster"
660+
# Good: "Focus on reducing memory allocations. Example: Replace `new Vector()` with pre-allocated arrays."
661+
# Avoid: "Make the code faster"
656662
```
657663

658664
**Include Domain Knowledge:**
659-
660665
```yaml
661-
# Good: Domain-specific guidance
662-
system_message: |
663-
For GPU kernels, prioritize:
664-
1. Memory coalescing (access patterns)
665-
2. Occupancy (thread utilization)
666-
3. Shared memory usage (cache blocking)
667-
668-
# Avoid: Generic optimization advice
669-
system_message: "Optimize the algorithm"
666+
# Good: "For GPU kernels: 1) Memory coalescing 2) Occupancy 3) Shared memory usage"
667+
# Avoid: "Optimize the algorithm"
670668
```
671669

672670
**Set Clear Boundaries:**
673-
674671
```yaml
675672
system_message: |
676-
MUST NOT CHANGE:
677-
❌ Function signatures
678-
❌ Algorithm correctness
679-
❌ External API compatibility
680-
681-
ALLOWED TO OPTIMIZE:
682-
✅ Internal implementation details
683-
✅ Data structures and algorithms
684-
✅ Performance optimizations
673+
MUST NOT CHANGE: ❌ Function signatures ❌ Algorithm correctness ❌ External API
674+
ALLOWED: ✅ Internal implementation ✅ Data structures ✅ Performance optimizations
685675
```
686676
687677
</details>
688678
689679
<details>
690680
<summary><b>🔬 Advanced Techniques</b></summary>
691681
692-
**Artifact-Driven Iteration:**
693-
694-
- Enable artifacts in your config
695-
- Include common error patterns in system message
696-
- Add guidance based on stderr/warning patterns
682+
**Artifact-Driven Iteration:** Enable artifacts in config → Include common error patterns in system message → Add guidance based on stderr/warning patterns
697683
698-
**Multi-Phase Evolution:**
684+
**Multi-Phase Evolution:** Start broad ("Explore different algorithmic approaches"), then focus ("Given successful simulated annealing, focus on parameter tuning")
699685
700-
```yaml
701-
# Phase 1: Broad exploration
702-
system_message: "Explore different algorithmic approaches..."
703-
704-
# Phase 2: Focused optimization
705-
system_message: "Given the successful simulated annealing approach,
706-
focus on parameter tuning and cooling schedules..."
707-
```
708-
709-
**Template Stochasticity:**
710-
711-
```yaml
712-
prompt:
713-
template_dir: "custom_templates/"
714-
use_template_stochasticity: true
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
721-
```
686+
**Template Stochasticity:** See the [Configuration section](#-configuration) for complete template variation examples.
722687
723688
</details>
724689
725690
### Meta-Evolution: Using OpenEvolve to Optimize Prompts
726691
727-
**You can use OpenEvolve to evolve your system messages themselves!**
728-
729-
```yaml
730-
# Example: Evolve prompts for HotpotQA dataset
731-
Initial Prompt: "Answer the question based on the context."
732-
733-
Evolved Prompt: "As an expert analyst, carefully examine the provided context.
734-
Break down complex multi-hop reasoning into clear steps. Cross-reference
735-
information from multiple sources to ensure accuracy. Answer: [question]"
736-
737-
Result: +23% accuracy improvement on HotpotQA benchmark
738-
```
692+
**You can use OpenEvolve to evolve your system messages themselves!** This powerful technique lets you optimize prompts for better LLM performance automatically.
739693
740-
See the [LLM Prompt Optimization example](examples/llm_prompt_optimization/) for a complete implementation.
694+
See the [LLM Prompt Optimization example](examples/llm_prompt_optimization/) for a complete implementation, including the HotpotQA case study with +23% accuracy improvement.
741695
742696
### Common Pitfalls to Avoid
743697
@@ -825,20 +779,7 @@ Want to contribute? Check out our [roadmap discussions](https://github.com/codel
825779
<details>
826780
<summary><b>💰 How much does it cost to run?</b></summary>
827781

828-
**Cost depends on your LLM provider and iterations:**
829-
830-
- **o3**: ~$0.15-0.60 per iteration (depending on code size)
831-
- **o3-mini**: ~$0.03-0.12 per iteration (more cost-effective)
832-
- **Gemini-2.5-Pro**: ~$0.08-0.30 per iteration
833-
- **Gemini-2.5-Flash**: ~$0.01-0.05 per iteration (fastest and cheapest)
834-
- **Local models**: Nearly free after setup
835-
- **OptiLLM**: Use cheaper models with test-time compute for better results
836-
837-
**Cost-saving tips:**
838-
- Start with fewer iterations (100-200)
839-
- Use o3-mini, Gemini-2.5-Flash or local models for exploration
840-
- Use cascade evaluation to filter bad programs early
841-
- Configure smaller population sizes initially
782+
See the [Cost Estimation](#cost-estimation) section in Installation & Setup for detailed pricing information and cost-saving tips.
842783

843784
</details>
844785

@@ -929,7 +870,7 @@ We welcome contributions! Here's how to get started:
929870

930871
**Articles & Blog Posts About OpenEvolve**:
931872
- [Towards Open Evolutionary Agents](https://huggingface.co/blog/driaforall/towards-open-evolutionary-agents) - Evolution of coding agents and the open-source movement
932-
- [OpenEvolve: GPU Kernel Discovery](https://huggingface.co/blog/codelion/openevolve-gpu-kernel-discovery) - Automated discovery of optimized GPU kernels with 2-3x speedups
873+
- [OpenEvolve: GPU Kernel Discovery](https://huggingface.co/blog/codelion/openevolve-gpu-kernel-discovery) - Automated discovery of optimized GPU kernels
933874
- [OpenEvolve: Evolutionary Coding with LLMs](https://huggingface.co/blog/codelion/openevolve) - Introduction to evolutionary algorithm discovery using large language models
934875

935876
## 📊 Citation

0 commit comments

Comments
 (0)