Minimal Example
Only one file is required: an evaluator. A seed program is optional but recommended.Step 1: Write the Evaluator
The evaluator scores whatever the LLM produces. It must return a dictionary withcombined_score:
Step 2: Write the Initial Program (Optional)
Provide a starting solution with anEVOLVE-BLOCK marking what to evolve:
Step 3: Create Config (Optional)
Provide search settings and a system prompt:Step 4: Run Evolution
initial_program.py, SkyDiscover will start from scratch.
Complete Example: String Compression
Let’s create a benchmark for evolving string compression algorithms.Directory Structure
Evaluator
Initial Program
Configuration
Test Data
Create sample test files:Running
Prompt Optimization Example
You can also optimize natural language prompts instead of code.Evaluator for Prompts
Initial Prompt
Configuration for Prompts
Best Practices
Fail Gracefully
Always return
{"combined_score": 0.0, "error": "..."} instead of raising exceptionsValidate Solutions
Check correctness before scoring. Invalid solutions should get score 0.0
Use Multiple Tests
Test on diverse inputs to avoid overfitting to a single test case
Normalize Scores
Make scores comparable across runs (e.g., ratio to baseline)
Add Timeouts
Use timeouts for evaluations that might hang
Log Metrics
Return detailed metrics beyond just combined_score for analysis
File Types
Common Patterns
Constructor-based Problems
Constructor-based Problems
Like circle packing: the program constructs a solution directly.
Optimization Problems
Optimization Problems
Like systems benchmarks: optimize a strategy or algorithm.
Algorithm Problems
Algorithm Problems
Like Frontier-CS: solve a computational problem.
Prompt Problems
Prompt Problems
Natural language that will be sent to an LLM.
Handling Timeouts
For long-running evaluations, use subprocess with timeout:Next Steps
Math Examples
See mathematical benchmarks
Systems Examples
See systems benchmarks
Algorithm Examples
See competitive programming