Skip to content

Conversation

@bluebread
Copy link
Contributor

@bluebread bluebread commented Oct 10, 2025

#277 Implemented novelty rejection sampling (as used in SakanaAI/ShinkaEvolve) and tested it on the function minimization example for 10 iterations. The combined score improved from 1.4975 -> 1.4995 (distance score 0.9950 -> 0.9995, value score unchanged). I’d appreciate any feedback or suggestions on this PR.

Changes

  • openevolve/database.py (+129 lines):
    • Added _is_novel() method with cosine similarity checking
    • Integrated LLM judge for programs exceeding similarity threshold
    • Per-island novelty tracking using embedding vectors (in Program class)
    • Modified ProgramDatabase.add() to reject non-novel programs
  • openevolve/config.py (+8 lines):
    • Added embedding_model, novelty_llm, and similarity_threshold config options
  • openevolve/controller.py (+1 line):
    • Integrated novelty LLM ensemble setup
  • examples/function_minimization/config.yaml (+3 lines):
    • Added novelty checking parameters

Test plan

  • All existing tests pass
  • Novelty feature debugged and working
  • Tested with function_minimization example

bluebread and others added 2 commits October 10, 2025 04:34
This commit introduces a novelty checking system that uses embeddings and LLM-based judging to ensure programs added to the database are meaningfully different from existing ones in their island.

Changes:
- Added EmbeddingClient class for computing code embeddings using OpenAI/Azure models
- Added novelty judge prompts for LLM-based similarity assessment
- Modified ProgramDatabase to support novelty checking before adding programs
- Added embedding vector field to Program dataclass
- Added configuration options for embedding model, novelty LLM, and similarity threshold
- Integrated novelty LLM ensemble in controller setup
- Updated example config with novelty checking parameters

The novelty check uses cosine similarity of embeddings as a first pass, then uses an LLM judge to determine if programs exceeding the similarity threshold are truly novel or just trivial variations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
- Fix novelty check in database.py to pass program.id instead of program object
- Fix missing self parameter in embedding.py _get_client_model method
- Fix serialization error by clearing novelty_llm before config deepcopy
- Update function_minimization config for testing with different models

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Oct 10, 2025

CLA assistant check
All committers have signed the CLA.

@codelion codelion merged commit 9df937a into algorithmicsuperintelligence:main Oct 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants