darwinian-evolver

Evolve prompts, regex patterns, SQL queries, and code snippets via LLM-driven mutation and fitness scoring.

Updated Jul 13, 2026
One-click install
npx skills add https://github.com/zangjeicy/Hermes --skill darwinian-evolver-zangjeicy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: darwinian-evolver
Source: https://github.com/zangjeicy/Hermes/tree/main/optional-skills/research/darwinian-evolver
Command: npx skills add https://github.com/zangjeicy/Hermes --skill darwinian-evolver-zangjeicy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, jinja2, and includes scripts (resource) components.

What problem does it solve?

This skill solves the challenge of manually tuning prompts, regex patterns, SQL queries, or code snippets by automating the search for optimal candidates using an evolutionary loop.

Core Features & Use Cases

  • Evolutionary Optimization: Uses an LLM-driven loop to mutate and score artifacts against a fitness function.
  • Custom Problem Definition: Provides templates to define organisms, evaluators, and mutators for domain-specific tasks.
  • Use Case: If you have a prompt that is failing on specific edge cases, this skill can evolve the prompt template over multiple iterations to maximize its success rate against your test suite.

Quick Start

Use the darwinian-evolver skill to optimize the prompt template in custom_problem_template.py by running the driver script with your desired number of iterations.

Frequently Asked Questions about darwinian-evolver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate prompt engineering to improve LLM performance on edge cases?

Automate prompt engineering by running an LLM-driven evolutionary search loop that mutates and scores prompt candidates against a defined fitness function. This iteratively refines prompts over multiple generations to maximize success rates against your test suite.

Can I optimize SQL queries and regex patterns automatically using Python?

You can optimize SQL queries and regex patterns automatically by defining custom organisms and evaluators in Python. The evolutionary loop mutates these artifacts and scores them against measurable fitness functions to find optimal candidates.

What is evolutionary optimization for code snippets and how does it work?

Evolutionary optimization for code snippets uses an LLM-driven loop to mutate code and evaluate it against a fitness function. It applies heuristic-based iterative refinement to discover improved code variants across multiple search generations.

Do I need OpenAI and Jinja2 to run the evolutionary optimization scripts?

Yes, you need OpenAI and Jinja2 dependencies installed to run the driver scripts. These libraries provide the LLM integration for mutation operations and the templating engine required to define custom problem organisms and evaluators.

How do I define a custom fitness function for domain-specific artifact optimization?

Define a custom fitness function by using the provided templates to specify your own organisms, evaluators, and mutators. This allows the evolutionary search loop to score domain-specific artifacts like prompts or queries against your unique test criteria.

When should I avoid using an evolutionary loop for prompt optimization?

Avoid using an evolutionary loop for prompt optimization when your task lacks a measurable fitness function or sufficient test cases. The iterative mutation and scoring process requires quantifiable evaluation criteria to effectively guide the search toward optimal candidates.