darwinian-evolver
Fungsinya
Skill ini menggunakan proses coba-dan-pilih otomatis untuk membuat prompt atau cuplikan kode menjadi lebih baik melalui banyak putaran. Skill ini ditujukan untuk orang yang memiliki cara yang jelas untuk memberi skor hasilnya.
Kapan dipakai
- βSaat Anda ingin mengoptimalkan prompt atau instruksi dan Anda dapat mengukur seberapa baik keluarannya.
- βSaat Anda ingin memperbaiki regex atau kueri SQL terhadap sekumpulan kasus uji.
- βSaat Anda hanya memiliki sedikit varian untuk dicoba, sehingga menulisnya secara manual lebih sederhana.
Link skill
https://github.com/NousResearch/hermes-agent/blob/main/optional-skills/research/darwinian-evolver/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βPerbaiki prompt ini agar memberikan jawaban yang benar untuk minimal 90 persen pertanyaan uji saya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill membantu AI Anda menulis definisi masalah dengan versi awal, tes penilaian, dan cara mengubahnya. Setelah itu, skill menjalankan alat evolusi hulu, yang mencoba banyak varian dan menyimpan yang terbaik.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Darwinian Evolver
Run Imbue's darwinian_evolver β an LLM-driven evolutionary search loop β to optimize a prompt, regex, SQL query, or small code snippet against a fitness function.
Status: thin wrapper around the upstream tool. The skill installs it, walks the
agent through writing a Problem definition (organism + evaluator + mutator),
and drives the loop via the upstream CLI or a small custom Python driver.
License: the upstream tool is AGPL-3.0. The skill ONLY ever invokes it
via the upstream CLI or a subprocess/uv run call (mere aggregation). Do NOT
import upstream classes into Hermes itself.
When to Use
- User says "optimize this prompt", "evolve a regex for X", "auto-improve this code/SQL", "search for a better instruction".
- You have a scorer (exact match, regex pass-rate, unit test, LLM-judge, runtime metric) AND a starting candidate (organism). If you don't have a scorer, stop and define one first β that's the hard part.
- Cost is OK: a typical run is 50β500 LLM calls. On gpt-4o-mini that's pennies; on Claude Sonnet it can be a few dollars.
Do not use this when:
- The optimization target is differentiable (use gradient descent / DSPy).
- You only need to try 2β3 variants β just write them by hand.
- The fitness signal is purely subjective with no measurable criterion.
Prerequisites
- Python β₯3.11
git,uv(orpip)- One of:
OPENROUTER_API_KEY,ANTHROPIC_API_KEY, orOPENAI_API_KEY
The skill ships a small parrot_openrouter.py driver that uses OPENROUTER_API_KEY
via the OpenAI SDK, so any model on OpenRouter works. The upstream CLI itself
hardcodes Anthropic and needs ANTHROPIC_API_KEY.
Install (One-Time)
Run via the terminal tool:
mkdir -p ~/.hermes/cache/darwinian-evolver && cd ~/.hermes/cache/darwinian-evolver
[ -d darwinian_evolver ] || git clone --depth 1 https://github.com/imbue-ai/darwinian_evolver.git
cd darwinian_evolver && uv sync
Verify:
cd ~/.hermes/cache/darwinian-evolver/darwinian_evolver \
&& uv run darwinian_evolver --help | head -5
Quick Start β The Built-In Parrot Example
Tiny smoke test (requires ANTHROPIC_API_KEY):
cd ~/.hermes/cache/darwinian-evolver/darwinian_evolver
uv run darwinian_evolver parrot \
--num_iterations 2 \
--num_parents_per_iteration 2 \
--mutator_concurrency 2 --evaluator_concurrency 2 \
--output_dir ~/.hermes/cache/scratch/parrot_demo
Outputs:
~/.hermes/cache/scratch/parrot_demo/snapshots/iteration_N.pklβ pickled population per iteration~/.hermes/cache/scratch/parrot_demo/<jsonl>β per-iteration JSON log (path printed at end)
Open ~/.hermes/cache/darwinian-evolver/darwinian_evolver/darwinian_evolver/lineage_visualizer.html
in a browser and load the JSON log to see the evolutionary tree.
Quick Start β OpenRouter Driver (No Anthropic Key)
The skill ships scripts/parrot_openrouter.py β same parrot problem, but the
LLM call goes through OpenRouter so any provider works.
# From wherever the skill is installed:
SKILL_DIR=~/.hermes/skills/research/darwinian-evolver
DE_DIR=~/.hermes/cache/darwinian-evolver/darwinian_evolver
cd "$DE_DIR" && \
EVOLVER_MODEL='openai/gpt-4o-mini' \
uv run --with openai python "$SKILL_DIR/scripts/parrot_openrouter.py" \
--num_iterations 3 --num_parents_per_iteration 2 \
--output_dir ~/.hermes/cache/scratch/parrot_or
Inspect the result with scripts/show_snapshot.py:
uv run --with openai python "$SKILL_DIR/scripts/show_snapshot.py" \
~/.hermes/cache/scratch/parrot_or/snapshots/iteration_3.pkl
Expected output: 7 evolved prompt templates ranked by score, with the best
landing around 0.6β0.8 (the seed Say {{ phrase }} scored 0.000).
Defining a Custom Problem
The skill ships templates/custom_problem_template.py β copy, edit, run.
Three things you must define:
Organismβ a PydanticBaseModelsubclass holding the artifact being evolved (prompt_template: str,regex_pattern: str,sql_query: str,code_block: str, etc.). Add arun(*args)method that exercises it.Evaluatorβ.evaluate(organism) -> EvaluationResult(score=..., trainable_failure_cases=[...], holdout_failure_cases=[...], is_viable=True).scoreis in[0, 1]. Higher is better.trainable_failure_casesβ what the mutator sees. Include enough context (input, expected, actual) for the LLM t
Pertanyaan umum
Berapa banyak panggilan AI yang dipakai dalam satu proses?
Skill menyatakan proses khas memakai 50 hingga 500 panggilan model, yang dapat menelan biaya beberapa sen hingga beberapa dolar tergantung model.
Apakah saya memerlukan metode penilaian?
Ya. Skill menyatakan jika tidak ada penilai, Anda harus menentukannya terlebih dahulu, karena itulah bagian yang sulit.
Lisensi apa yang berlaku untuk alat ini?
Skill menyatakan alat hulu berlisensi AGPL-3.0 dan hanya dijalankan melalui baris perintahnya atau sebagai proses terpisah.
Detail
Deskripsi asli dari pembuat
Evolve prompts/regex/SQL/code with Imbue's evolution loop.
Popularitas
- Bintang GitHub
- 260k
- Peringkat
- #549
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
agent-merge-conflict-arbiter
260kMenyelesaikan konflik merge git antara cabang dua agent sebagai pihak ketiga yang netral, menghasilkan satu hasil gabungan untuk repo.
antigravity-cli
260kMemandu Anda memasang, memperbarui, dan memecahkan masalah alat baris perintah Antigravity, termasuk plugin, login, dan sandbox-nya.
blackbox
260kMemungkinkan agent Anda menyerahkan tugas pemrograman ke alat baris perintah Blackbox AI, yang menjalankan beberapa model AI dan memilih hasil terbaik.
dynamic-workflow
260kMengajari agent Anda menjalankan pekerjaan sejenis dalam jumlah besar sebagai skrip tersimpan, sehingga hanya hasil terverifikasi yang kembali ke percakapan utama.
Skill serupa
writing-skills
311kMengajari agent Anda menulis skill baru dan menguji setiap skill lebih dulu, memastikan skill itu benar-benar mengubah perilaku agent.
writing-for-agents
310kMenjelaskan cara menulis instruksi yang jelas untuk agent AI, termasuk file skill, AGENTS.md, dan CLAUDE.md, agar perilaku agent dapat diprediksi.
bengali-nlp
280kMembuat agent Anda memproses teks Bahasa Bengali. Membantu memahami dan mengolah bahasa tersebut, termasuk normalisasi teks dan karakteristik uniknya.