Evolutionary Prompting: Automating Large Language Model Queries for Machine Learning Task Identification using Grammatical Evolution
Created by W.Langdon from
gp-bibliography.bib Revision:1.9212
- @InProceedings{Goncalves:2026:CEC,
-
author = "Carlos Goncalves and Pedro Pereira and Paulo Cortez",
-
title = "Evolutionary Prompting: Automating Large Language
Model Queries for Machine Learning Task Identification
using Grammatical Evolution",
-
booktitle = "IEEE CEC 2026",
-
year = "2026",
-
editor = "Nelishia Pillay and Yew-Soon Ong and Carlos Coello and
Juergen Branke and Simon Lucas and Chuan-Kang Ting and
Bing Xue",
-
pages = "cec pap329",
-
address = "Maastricht, the Netherlands",
-
month = "21-26 " # jun,
-
publisher = "IEEE",
-
keywords = "genetic algorithms, genetic programming, Grammatical
Evolution, Agentic System, Machine Learning, Prompt
Engineering, LLM, AI, ANN",
-
URL = "
https://wcci.klinkhamergroup.com/papers/by_date.html#cec_pap329",
-
URL = "
https://linklings.s3.amazonaws.com/organizations/WCCI/wcci2026/submissions/stype102/gWu1C-cec_pap329s2.pdf",
-
size = "7 pages",
-
abstract = "We propose a novel framework for automated prompt
engineering that leverages Grammar-Guided Evolutionary
Algorithms to navigate the search space of Large
Language Models (LLMs). As a use case, we apply the
framework to the Machine Learning (ML) Goal (MLG),
where a zero-shot or few-shot LLM query is used to
infer the proper MLG (e.g., classification, regression,
clustering) from a business need description. Our
approach uses an explicit Context-Free Grammar (CFG) to
enforce syntactic constraints and inject domain
knowledge into the LLM prompts. The optimization engine
employs a Grammatical Evolution (GE), mapping integer
genotypes to valid prompt phenotypes through grammar
derivation trees. We formulate the search as a
Multi-Objective Optimization Problem (MOOP), seeking a
Pareto-optimal set of solutions that balance two
conflicting objectives: maximizing ML task accuracy and
minimizing LLM inference time. To ensure robustness,
the solutions are evolved using one recently proposed
MLG dataset and a newly proposed adaptive sampling
mechanism (to speed up the computation). Moreover, the
final Pareto solutions are then explicitly evaluated on
a distinct unseen MLG dataset. Overall, competitive
results were obtained when comparing our GE approach
with two baselines (expert prompting and an AutoML
tool)",
-
notes = "University of Minho, Guimaraes, Portugal",
- }
Genetic Programming entries for
Carlos Goncalves
Pedro Pereira
Paulo Cortez
Citations