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

Note: The package is installed as evotoolkit but imported as evotool:

import evotoolkit  # Note: import name is different from package name

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/

License

MIT License

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-0.3.0b2.tar.gz (77.7 kB view details)

Uploaded Source

Built Distribution

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

evotoolkit-0.3.0b2-py3-none-any.whl (124.4 kB view details)

Uploaded Python 3

File details

Details for the file evotoolkit-0.3.0b2.tar.gz.

File metadata

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

File hashes

Hashes for evotoolkit-0.3.0b2.tar.gz
Algorithm Hash digest
SHA256 677af0058a030f459ab7c610422214e5b97a4602791fa73f79819c3d1cecf60e
MD5 b2a57c7d9c91428f05b8b3256b824c91
BLAKE2b-256 dd595ca80ed873b9209a0dea15d2844a2ae4fe85fefe46676ccda551601d1b77

See more details on using hashes here.

File details

Details for the file evotoolkit-0.3.0b2-py3-none-any.whl.

File metadata

  • Download URL: evotoolkit-0.3.0b2-py3-none-any.whl
  • Upload date:
  • Size: 124.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-0.3.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a5b11d1334db7f17f5b9fe12a85cb3e8454b2b6a3bd91030633fbf37b66d9a5
MD5 0668812171d49cfd3fb8876fd3d3468f
BLAKE2b-256 0ba873dbb6bcd03a59a70b83745ba87a07490e4814423840a236eac779ffb262

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