ExpertPrompting: Instructing Large Language Models to be Distinguished Experts

Benfeng Xu, An Yang, Junyang Lin, Quan Wang, Chang Zhou, Yongdong Zhang, Zhendong Mao · DOI

TL;DR

This paper introduces "ExpertPrompting," a novel method to significantly improve LLM responses by instructing them to act as distinguished experts for specific tasks. They developed a new dataset and trained an open-source chatbot, ExpertLLaMA, which achieves near ChatGPT-level performance, demonstrating the effectiveness of expert-guided prompting.

What Problem Does This Paper Address?

Large Language Models (LLMs) are powerful tools, but their output quality can be highly sensitive to how they are prompted. Even with the same underlying intent, a well-crafted prompt can yield a comprehensive, detailed answer, while a poorly crafted one might result in a less helpful response. This "art of prompting" creates a barrier to consistent, high-quality LLM performance. While some methods exist for improving prompts (e.g., chain-of-thought, providing general principles), they are often task-specific or require complex reasoning. This paper aims to provide a more generalized, effective, and easy-to-implement prompting strategy to unlock the full potential of LLMs by making them act as specialized experts.

Methods

The core innovation is ExpertPrompting. This strategy involves two main steps:

  1. Expert Identity Synthesis: For each given instruction, the system automatically generates a detailed and customized description of a "distinguished expert" who would be best suited to answer that instruction. This is achieved using In-Context Learning (ICL). The authors provide a few examples of instruction-expert pairs to a base LLM (like GPT-3.5), and the LLM then generates a new expert description for the target instruction. These descriptions are designed to be specific, informative, and automatically generated.
  2. Expert-Conditioned Answering: Once the expert identity is synthesized, the LLM is then prompted to answer the original instruction conditioned on this expert persona. This means the LLM is instructed to respond as that specific expert.

The authors also developed ExpertLLaMA, an open-source chat assistant trained on a new dataset generated using ExpertPrompting with GPT-3.5.

Datasets

  • Alpaca Instructions: The authors used the prevailing 52k instruction-following dataset from Alpaca (Taori et al., 2023) as the base for their experiments.
  • Expert-Prompting Dataset: A new dataset was created by applying the ExpertPrompting strategy to the Alpaca instructions using GPT-3.5. This dataset consists of instruction-expert pairs and the corresponding expert-generated answers.
  • Vicuna 80: Used as an unseen test set for model evaluation, comprising diverse question categories.

Key Insights and Ideas

  • The Power of Persona: LLMs can significantly enhance their output quality by adopting a specific, well-defined expert persona. This goes beyond simply asking for a good answer; it's about framing the LLM's role.
  • Automatic Expert Generation is Feasible: The paper demonstrates that LLMs can automatically synthesize relevant and detailed expert descriptions using ICL, making the ExpertPrompting strategy scalable and practical.
  • Expert-Conditioned Answers are Higher Quality: The generated expert answers are demonstrably better than vanilla answers, implying greater comprehensiveness and detail, even without explicit length constraints.
  • Open-Source Advancement: The creation of ExpertLLaMA provides a valuable open-source resource that rivals proprietary models, democratizing access to high-performance LLM assistants.

Key Results

  • Data Quality: GPT-4 evaluation showed that ExpertPrompting answers were preferred by the reviewer model at 48.5%, compared to 23% for vanilla answers.
  • Model Performance: ExpertLLaMA, trained on the ExpertPrompting data, outperformed existing open-source chat assistants like Vicuna and LLaMA-GPT4.
  • ChatGPT Comparison: ExpertLLaMA achieved approximately 96% of the capability of the original ChatGPT, a significant achievement for an open-source model trained on GPT-3.5-generated data.
  • Answer Length: Expert-prompted answers were significantly longer than vanilla answers, suggesting increased detail and comprehensiveness.

Limitations and Future Work

  • Rigorous Validation: The authors acknowledge that the 96% ChatGPT capability claim needs more rigorous validation.
  • Scale of Data: To further improve ExpertLLaMA, the authors plan to enlarge the scale of instruction data beyond the 52k Alpaca dataset.
  • Generalizability: While the method is presented as generalized, further exploration across a wider range of domains and LLM architectures would be beneficial.
  • Potential for Bias: The automatic generation of expert identities could, in principle, introduce biases if not carefully managed or if the base LLM has inherent biases.

Summary updated

BibTeX
@misc{xu2023expertprompting,
  author = {Benfeng Xu and An Yang and Junyang Lin and Quan Wang and Chang Zhou and Yongdong Zhang and Zhendong Mao},
  title = {{ExpertPrompting: Instructing Large Language Models to be Distinguished Experts}},
  year = {2023},
  eprint = {2305.14688},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.14688},
}
Figure