Minimum Requirements
Only 1 file is required:evaluator.py
A Python function that scores whatever the LLM produces
initial_program.py
Seed solution to evolve from
config.yaml
System prompt and search settings
Evaluator
The evaluator is a Python function that receives a file path and returns a metrics dictionary.Function Signature
evaluator.py
Complete Example: Math Optimization
Here’s a real evaluator from the Heilbronn triangle benchmark:benchmarks/math/heilbronn_triangle/evaluator.py
Key Points
Import the program dynamically
Import the program dynamically
Use
importlib to load the generated program:combined_score is required
combined_score is required
SkyDiscover uses
combined_score to guide search. It should be:- 0.0 for complete failure
- 1.0 for meeting the target
- > 1.0 for exceeding the target
Return on error, don't raise
Return on error, don't raise
Raising exceptions will crash the discovery loop. Instead:
Add optional metrics
Add optional metrics
Extra metrics are logged but don’t affect search:
Seed Program
The seed program is the starting solution. Mark the region for the LLM to evolve withEVOLVE-BLOCK markers.
Code Tasks
For code optimization, useinitial_program.py:
initial_program.py
Everything between
# EVOLVE-BLOCK-START and # EVOLVE-BLOCK-END can be mutated by the LLM. Code outside these markers is preserved.Prompt Tasks
For prompt optimization, use a plain text file:initial_prompt.txt
language: text in config:
config.yaml
Configuration
Createconfig.yaml to set the system prompt and search parameters:
config.yaml
If you don’t provide
config.yaml, SkyDiscover uses default settings with a generic system prompt.Directory Structure
Organize your benchmark like this:Running Your Benchmark
With seed program:
Without seed program (from scratch):
Advanced: Docker Evaluation
For sandboxed execution, use Docker in your evaluator:benchmarks/frontier-cs-eval/ for a complete Docker judge example.
Benchmark Types
SkyDiscover includes ~200 tasks across multiple domains:Next Steps
Custom Algorithms
Implement your own search strategies
Context Builders
Customize prompt generation