Skip to main content

Interactive LLM-driven automated algorithm design with evolutionary optimization

Project description

LLM4AD_Next

From problem description to runnable evolutionary algorithm search โ€” in one command.
LLM-driven automated algorithm design with evolutionary optimization

PyPI Version Python Versions License CI


๐Ÿ”ฅ News

  • ๐Ÿš€ [2026.07][New Release]: LLM4AD_Next Online Trial is now available at https://llm4ad-next.cn/ โ€” try the full problem-to-algorithm workflow directly in your browser with no local setup.
  • โœจ [2026.07][New Feature]: Introducing an interactive problem-to-project workflow that turns natural-language problem descriptions into runnable evolutionary algorithm search projects.
  • ๐Ÿณ [2026.07][New Feature]: Versioned Docker Hub deployment images are now aligned with GitHub Release tags for reproducible local deployment.

๐Ÿš€ Why LLM4AD_Next?

Traditionally, using Large Language Models for Automated Algorithm Design (LLM4AD) required a tedious, multi-step configuration pipeline. LLM4AD_Next destroys this entry barrier.

LLM4AD vs LLM4AD_Next Process Overview

With LLM4AD_Next, after creating your directory, all of these painful steps are fully automated through an interactive conversational terminal. Just run:

uv run llm4ad chat

Our built-in AI-powered consultant will interview you, instantly understand your requirements, and automatically generate a ready-to-run pipeline (evaluator, algorithm skeleton, configuration, and debugger) so you can leap straight into producing Useful Algorithms.

๐ŸŽฏ Key Features Overview

  • ๐Ÿง  LLM-Powered Design & ๐Ÿงฌ Evolutionary Optimization combined to automatically evolve top-performing code.
  • ๐Ÿ’ฌ Interactive Configuration (llm4ad chat) โ€” Your conversational AI consultant that generates the entire runnable app framework.
  • ๐Ÿ” Evolve-Block Advisor & Recommender โ€” Point LLM4AD_Next at any repository, and it will scan, score, and recommend exactly which blocks of code are most promising to evolve to hit your goals.

Quick Start

Try Online
Watch Instruction
Read Docs
Run LLM4AD_Next in your browser. No installation or API key required. Watch the introduction before installing or configuring a local environment. Use the documentation path map for setup, configuration, examples, and Web UI deployment.
Launch Online Demo Watch the instruction video on YouTube Open Documentation

Instruction Video

Run LLM4AD

Option A: Online Demo (No Installation Required)

Use the online demo from Quick Start, or open it directly: Launch Online Demo.

No setup, no API key needed โ€” just open the link and start designing algorithms.

Option B: Local Installation

Requires Python 3.12+ (pinned in .python-version) and uv (recommended) or pip. A plain uv sync sets up everything, including the chatv2 AI build agent, out of the box.

# Clone the repository
git clone https://github.com/Optima-CityU/LLM4AD_Next.git
cd LLM4AD_Next

# Install dependencies
uv sync

# Configure your LLM provider (see Global Settings section below)
# Or set environment variables directly:
export LLM_BASE_URL="https://api.openai.com/v1"
export LLM_API_KEY="your-api-key"
export LLM_MODEL="gpt-4o"

# Option 1: Interactive configuration (recommended for new users)
llm4ad chat

# Option 2: Run with an existing config file
llm4ad run examples/applications/tsp_benchmark_python/config.yaml

For optional dependency groups (infra, providers, eval, dev, docs, all) and uv installation, see the Installation Guide.

Global Settings

Create ~/.llm4ad/settings.yaml to configure shared providers across all projects:

providers:
  - name: default
    type: openai
    api_key: ${OPENAI_API_KEY}
    model: gpt-4o
  - name: anthropic
    type: anthropic
    api_key: ${ANTHROPIC_API_KEY}
    model: claude-sonnet-4-20250514

Task configs then only need the provider name โ€” credentials and model are resolved from global settings automatically.

For CLI commands, the interactive chat workflow, the Evolve-Block Advisor / Recommender, and the Python API, see the Documentation.

Documentation

Local Development

# Serve documentation with live reload
mkdocs serve

# Build static documentation
mkdocs build

Project Structure

LLM4AD/
โ”œโ”€โ”€ src/llm4ad/          # Main source code
โ”‚   โ”œโ”€โ”€ config/           # Configuration schemas and global settings
โ”‚   โ”œโ”€โ”€ consultant/       # Interactive configuration wizard
โ”‚   โ”œโ”€โ”€ builder/          # Task builder (analyzer, creator, validator, writer)
โ”‚   โ”œโ”€โ”€ advisor/          # Evolve-block advisor and recommender
โ”‚   โ”œโ”€โ”€ provider/         # LLM provider implementations
โ”‚   โ”œโ”€โ”€ planner/          # Algorithm planning layer
โ”‚   โ”œโ”€โ”€ coder/            # Code generation layer
โ”‚   โ”œโ”€โ”€ evaluator/        # Evaluation layer
โ”‚   โ”œโ”€โ”€ orchestrator/     # Workflow orchestration
โ”‚   โ”œโ”€โ”€ infra/            # Infrastructure (Ray, monitoring)
โ”‚   โ””โ”€โ”€ utils/            # Utilities
โ”œโ”€โ”€ examples/             # Example configurations and applications
โ”œโ”€โ”€ tests/                # Test suite
โ””โ”€โ”€ docs/                 # Documentation

Contributing

Contributions are welcome! Please read our Contributing Guide for details.

# Set up development environment
uv sync --extra all

# Run tests
pytest

# Format code
black src/ tests/
ruff check src/ tests/ --fix

License

This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.

Support

Join the Community

Scan the QR code with WeChat to join the LLM4AD_Next community group.

LLM4AD_Next WeChat community QR code

Star History

Star history

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

llm4ad_next-1.0.0.tar.gz (7.7 MB view details)

Uploaded Source

Built Distribution

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

llm4ad_next-1.0.0-py3-none-any.whl (441.3 kB view details)

Uploaded Python 3

File details

Details for the file llm4ad_next-1.0.0.tar.gz.

File metadata

  • Download URL: llm4ad_next-1.0.0.tar.gz
  • Upload date:
  • Size: 7.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for llm4ad_next-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a7613f869ab342b36fbf0e5f2254083952cb37a1ecc9d943a42bd0beb5cf168e
MD5 44316bf447b44344311c76a7f8d75f17
BLAKE2b-256 da153a34c27fe47911163d654f11b0cca58192f14c22313b90988cd12c9eb7d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm4ad_next-1.0.0.tar.gz:

Publisher: release.yml on Optima-CityU/LLM4AD_Next

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm4ad_next-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: llm4ad_next-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 441.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for llm4ad_next-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c281021eb01facebabf9d2913fecef46cfd7d09e017b7360ff34f9a99f356c7
MD5 83f2ed03a0147d1dcffd9ebcb0c05906
BLAKE2b-256 e4d3cb8a36c558e27ac07833e4bd3c8e21d6dedb0fb7099b203b9e6cc9d62260

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm4ad_next-1.0.0-py3-none-any.whl:

Publisher: release.yml on Optima-CityU/LLM4AD_Next

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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