Online prompt selection for program synthesis

Yixuan Li, Lewis Frampton, Federico Mora, Elizabeth Polgreen

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Large Language Models (LLMs) demonstrate impressive capabilities in the domain of program synthesis. This level of performance is not, however, universal across all tasks, all LLMs and all prompting styles. There are many areas where one LLM dominates, one prompting style dominates, or where calling a symbolic solver is a better choice than an LLM. A key challenge for the user then, is to identify not only when an LLM is the right choice of solver, and the appropriate LLM to call for a given synthesis task, but also the right way to call it. A non-expert user who makes the wrong choice, incurs a cost both in terms of results (number of tasks solved, and the time it takes to solve them) and financial cost, if using a closed-source language model via a commercial API. We frame this choice as an online learning problem. We use a multi-armed bandit algorithm to select which symbolic solver, or LLM and prompt combination to deploy in order to maximize a given reward function (which may prioritize solving time, number of synthesis tasks solved, or financial cost of solving). We implement an instance of this approach, called CYANEA, and evaluate it on synthesis queries from the literature in ranking function synthesis, from the syntax-guided synthesis competition, and fresh, unseen queries generated from SMT problems. CYANEA solves 37.2% more queries than the best single solver and achieves results within 4% of the virtual best solver.
Original languageEnglish
Title of host publicationProceedings of the 39th Annual AAAI Conference on Artificial Intelligence
EditorsToby Walsh, Julie Shah, Zico Kolter
Place of PublicationWashington, DC, USA
PublisherAAAI Press
Pages11282-11289
Number of pages8
ISBN (Electronic)9781577358978
DOIs
Publication statusPublished - 11 Apr 2025
EventThe 39th Annual AAAI Conference on Artificial Intelligence - Pennsylvania Convention Center, Philadelphia, United States
Duration: 25 Feb 20254 Mar 2025
Conference number: 39
https://aaai.org/conference/aaai/aaai-25/

Publication series

NameProceedings of the AAAI Conference on Artificial Intelligence
PublisherAAAI Press
Number11
Volume39
ISSN (Print)2159-5399
ISSN (Electronic)2374-3468

Conference

ConferenceThe 39th Annual AAAI Conference on Artificial Intelligence
Abbreviated titleAAAI-25
Country/TerritoryUnited States
CityPhiladelphia
Period25/02/254/03/25
Internet address

Fingerprint

Dive into the research topics of 'Online prompt selection for program synthesis'. Together they form a unique fingerprint.

Cite this