Automatic Prompt Optimization for Dataset-Level Feature Discovery
Adrian Cosma, Oleg Szehr, David Kletz, Alessandro Antonucci, Olivier Pelletier
TL;DR
The paper reframes feature discovery from unstructured text as a dataset-level prompt optimization problem, introducing a multi-agent framework that jointly proposes, extracts, and evaluates a global set of interpretable features to optimize downstream classification. By grounding feedback at the dataset level rather than per example, and by incorporating interpretability signals through a ReflectiveProposer, the approach yields more robust and grounded features than per-sample methods or hand-crafted prompts. Empirical results across financial sentiment and toxicity datasets show consistent improvements in F1 and feature interpretability, while preventing leakage of the target label into features. The work demonstrates the practicality and benefits of dataset-level prompt optimization for automatic, interpretable feature engineering, with limitations including computational cost and dependence on instruction-following quality of the underlying models.
Abstract
Feature extraction from unstructured text is a critical step in many downstream classification pipelines, yet current approaches largely rely on hand-crafted prompts or fixed feature schemas. We formulate feature discovery as a dataset-level prompt optimization problem: given a labelled text corpus, the goal is to induce a global set of interpretable and discriminative feature definitions whose realizations optimize a downstream supervised learning objective. To this end, we propose a multi-agent prompt optimization framework in which language-model agents jointly propose feature definitions, extract feature values, and evaluate feature quality using dataset-level performance and interpretability feedback. Instruction prompts are iteratively refined based on this structured feedback, enabling optimization over prompts that induce shared feature sets rather than per-example predictions. This formulation departs from prior prompt optimization methods that rely on per-sample supervision and provides a principled mechanism for automatic feature discovery from unstructured text.
