Skip to main content

LLM-driven code evolution method library.

Project description

EvoToolkit

LLM-driven solution evolutionary optimization toolkit

EvoToolkit is a Python library that leverages Large Language Models (LLMs) to evolve solutions for optimization problems. It combines the power of evolutionary algorithms with LLM-based solution generation and refinement.

Installation

pip install evotoolkit
import evotoolkit  

Quick Start

import evotoolkit
from evotoolkit.task.python_task.scientific_regression import ScientificRegressionTask
from evotoolkit.task.python_task import EvoEngineerPythonInterface
from evotoolkit.tools import HttpsApi

# 1. Create a task
task = ScientificRegressionTask(dataset_name="bactgrow")

# 2. Create an interface
interface = EvoEngineerPythonInterface(task)

# 3. Solve with LLM
llm_api = HttpsApi(
    api_url="https://api.openai.com/v1/chat/completions",
    key="your-api-key-here",
    model="gpt-4o"
)
result = evotoolkit.solve(
    interface=interface,
    output_path='./results',
    running_llm=llm_api,
    max_generations=5
)

Features

  • 🤖 LLM-Driven Evolution: Use language models to generate and evolve solutions
  • 🔬 Multiple Algorithms: EoH, EvoEngineer, and FunSearch
  • 🌍 Task-Agnostic: Supports code, text, math expressions, etc.
  • 🎯 Extensible: Easy-to-extend task system
  • 🔌 Simple API: High-level evotoolkit.solve() function

Documentation

Full documentation: https://evotoolkit.readthedocs.io/

Citation

If you use EvoToolkit in your research, please cite:

@article{guo2025evotoolkit,
  title={evotoolkit: A Unified LLM-Driven Evolutionary Framework for Generalized Solution Search},
  author={Guo, Ping and Zhang, Qingfu},
  journal={arXiv preprint arXiv:XXXX.XXXXX},
  year={2025},
  note={Submitted to arXiv}
}

License

MIT License. For academic use, please cite our paper above.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evotoolkit-1.0.0rc2.tar.gz (80.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evotoolkit-1.0.0rc2-py3-none-any.whl (126.4 kB view details)

Uploaded Python 3

File details

Details for the file evotoolkit-1.0.0rc2.tar.gz.

File metadata

  • Download URL: evotoolkit-1.0.0rc2.tar.gz
  • Upload date:
  • Size: 80.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for evotoolkit-1.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 b3ecfc14ae64058679a567d4c7e0835df73c25c6065d702e96101209083055f5
MD5 542292fd87e7cbdafc1a70c906717977
BLAKE2b-256 e0031d05631746efe80e91120033a4a5081e1a2f0119e6c4325c7f9255aa4bf0

See more details on using hashes here.

File details

Details for the file evotoolkit-1.0.0rc2-py3-none-any.whl.

File metadata

  • Download URL: evotoolkit-1.0.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 126.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for evotoolkit-1.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 7dc3c28f956b9c8745d8f25d0b4e82ea9ff0b5b8faface57ea2ba3439c8e82e9
MD5 368fe422d99af58802e4fafc7d82fb97
BLAKE2b-256 a6dda8eda512b78a4a95ce1c0dc533e72efae628288f9adc6875774934a9a7ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page