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 evotool  # Note: import name is different from package name

Quick Start

import evotool
from evotool.task.python_task.scientific_regression import ScientificRegressionTask
from evotool.task.python_task import EvoEngineerPythonInterface
from evotool.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 = evotool.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 evotool.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.0b1.tar.gz (78.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-0.3.0b1-py3-none-any.whl (124.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: evotoolkit-0.3.0b1.tar.gz
  • Upload date:
  • Size: 78.0 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.0b1.tar.gz
Algorithm Hash digest
SHA256 ed9fca61f9e332120b99cabfedc7e4dec236c5b4bad19ee85ec4335fd7c7ee61
MD5 52f0c8e4c749f9e1d43cf1d0212d15fc
BLAKE2b-256 8f6bec93c56e331eff55f0c9429407e565fd648ef0c371f28f0619a30c275089

See more details on using hashes here.

File details

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

File metadata

  • Download URL: evotoolkit-0.3.0b1-py3-none-any.whl
  • Upload date:
  • Size: 124.8 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.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 3cf7c037175f9b598a74e0dca666e6e557e76b566b5a4efa2f472efb74883a4d
MD5 cfcfacc0574873c15a30e616182d366c
BLAKE2b-256 63bb3d2ce1f562add8eff6f5217132a5d3b79534450577e3f97f88188edf9b7c

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