One Prompt is not Enough: Automated Construction of a Mixture-of-Expert Prompts

Ruochen Wang, Sohyun An, Minhao Cheng, Tianyi Zhou, Sung Ju Hwang +1 more
6/28/2024
cs.AIcs.CLcs.LG

No official code found. Best implementation: ruocwang/mixture-of-prompts (31 stars, Apache-2.0, last commit 2024-09-25).

Abstract

Large Language Models (LLMs) exhibit strong generalization capabilities to novel tasks when prompted with language instructions and in-context demos. Since this ability sensitively depends on the quality of prompts, various methods have been explored to automate the instruction design. While these methods demonstrated promising results, they also restricted the searched prompt to one instruction. Such simplification significantly limits their capacity, as a single demo-free instruction might not be able to cover the entire complex problem space of the targeted task. To alleviate this issue, we adopt the Mixture-of-Expert paradigm and divide the problem space into a set of sub-regions; Each sub-region is governed by a specialized expert, equipped with both an instruction and a set of demos. A two-phase process is developed to construct the specialized expert for each region: (1) demo assignment: Inspired by the theoretical connection between in-context learning and kernel regression, we group demos into experts based on their semantic similarity; (2) instruction assignment: A region-based joint search of an instruction per expert complements the demos assigned to it, yielding a synergistic effect. The resulting method, codenamed Mixture-of-Prompts (MoP), achieves an average win rate of 81% against prior arts across several major benchmarks.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[ICML 2024] One Prompt is Not Enough: Automated Construction of a Mixture-of-Expert Prompts - TurningPoint AI

312Shell, PythonJun 26, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{wang2024prompt,
  title  = {One Prompt is not Enough: Automated Construction of a Mixture-of-Expert Prompts},
  author = {Ruochen Wang and Sohyun An and Minhao Cheng and Tianyi Zhou and Sung Ju Hwang and Cho-Jui Hsieh},
  year   = {2024},
  eprint = {2407.00256},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.00256v1},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.00256.svg)](https://codeofpaper.com/paper/2407.00256)

Discussion