PromptWise: Online Learning for Cost-Aware Prompt Assignment in Generative Models

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Hu, Xiaoyan, Pick, Lauren, Leung, Ho-fung, Farnia, Farzan
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866911245184008192
author Hu, Xiaoyan
Pick, Lauren
Leung, Ho-fung
Farnia, Farzan
author_facet Hu, Xiaoyan
Pick, Lauren
Leung, Ho-fung
Farnia, Farzan
contents The rapid advancement of generative AI has provided users with a wide range of well-trained models to address diverse prompts. When selecting a model for a given prompt, users should weigh not only its performance but also its service cost. However, existing model-selection methods typically emphasize performance while overlooking cost differences. In this paper, we introduce PromptWise, an online learning framework that assigns prompts to generative models in a cost-aware manner. PromptWise estimates prompt-model compatibility to select the least expensive model expected to deliver satisfactory outputs. Unlike standard contextual bandits that make a one-shot decision per prompt, PromptWise employs a cost-aware bandit structure that allows sequential model assignments per prompt to reduce total service cost. Through numerical experiments on tasks such as code generation and translation, we demonstrate that PromptWise can achieve performance comparable to baseline selection methods while incurring substantially lower costs. The code is available at: github.com/yannxiaoyanhu/PromptWise.
format Preprint
id arxiv_https___arxiv_org_abs_2505_18901
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle PromptWise: Online Learning for Cost-Aware Prompt Assignment in Generative Models
Hu, Xiaoyan
Pick, Lauren
Leung, Ho-fung
Farnia, Farzan
Machine Learning
Artificial Intelligence
The rapid advancement of generative AI has provided users with a wide range of well-trained models to address diverse prompts. When selecting a model for a given prompt, users should weigh not only its performance but also its service cost. However, existing model-selection methods typically emphasize performance while overlooking cost differences. In this paper, we introduce PromptWise, an online learning framework that assigns prompts to generative models in a cost-aware manner. PromptWise estimates prompt-model compatibility to select the least expensive model expected to deliver satisfactory outputs. Unlike standard contextual bandits that make a one-shot decision per prompt, PromptWise employs a cost-aware bandit structure that allows sequential model assignments per prompt to reduce total service cost. Through numerical experiments on tasks such as code generation and translation, we demonstrate that PromptWise can achieve performance comparable to baseline selection methods while incurring substantially lower costs. The code is available at: github.com/yannxiaoyanhu/PromptWise.
title PromptWise: Online Learning for Cost-Aware Prompt Assignment in Generative Models
topic Machine Learning
Artificial Intelligence
url https://arxiv.org/abs/2505.18901