Skip to content

Commit 9cd0b69

Browse files
committed
Refine prompt context and bump version to 0.0.8
Updated the controller to use actual top programs for prompt context, ensuring the LLM receives only high-performing examples, and passed inspirations separately. Incremented the package version to 0.0.8 in both pyproject.toml and setup.py.
1 parent 241b334 commit 9cd0b69

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

openevolve/controller.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,18 @@ async def run(
263263
# Get artifacts for the parent program if available
264264
parent_artifacts = self.database.get_artifacts(parent.id)
265265

266+
# Get actual top programs for prompt context (separate from inspirations)
267+
# This ensures the LLM sees only high-performing programs as examples
268+
actual_top_programs = self.database.get_top_programs(5)
269+
266270
# Build prompt
267271
prompt = self.prompt_sampler.build_prompt(
268272
current_program=parent.code,
269273
parent_program=parent.code, # We don't have the parent's code, use the same
270274
program_metrics=parent.metrics,
271275
previous_programs=[p.to_dict() for p in self.database.get_top_programs(3)],
272-
top_programs=[p.to_dict() for p in inspirations],
276+
top_programs=[p.to_dict() for p in actual_top_programs], # Use actual top programs
277+
inspirations=[p.to_dict() for p in inspirations], # Pass inspirations separately
273278
language=self.language,
274279
evolution_round=i,
275280
diff_based_evolution=self.config.diff_based_evolution,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "openevolve"
7-
version = "0.0.7"
7+
version = "0.0.8"
88
description = "Open-source implementation of AlphaEvolve"
99
readme = "README.md"
1010
requires-python = ">=3.9"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="openevolve",
5-
version="0.0.7",
5+
version="0.0.8",
66
packages=find_packages(),
77
include_package_data=True,
88
)

0 commit comments

Comments
 (0)