ACL 2024findings0 citations

P4: Plug-and-Play Discrete Prompting for Large Language Models Personalization

Yuansen Zhang, Xiao Wang, Tianze Chen, Jiayi Fu, Tao Gui, Qi Zhang

Abstract

Empowering Large Language Models (LLMs) with distinct human-like personality traits has become an innovative task for developing advanced dialog systems.Although LLMs demonstrate impressive capabilities in following instructions, directly prompting them to exhibit certain personalities through manually crafted instructions may result in sub-optimal performance.In this paper, we propose a plug-and-play prompting method to manipulate the LLMs’ personality traits.Specifically, we append discrete personalized suffixes, automatically generated through an aggregated gradient-based search method, to the user query or dialog histories and induce LLMs to respond with target personalities.In addition, due to the high redundancy of the search space, we adopt a reward-based strategy to prune the vocabulary and focus exclusively on influential tokens.Experiment results on four models ranging from 1.1B to 13B show that our method achieves 79.9% accuracy in customizing LLMs’ personalities, significantly outperforming other prompting methods (65.5%) and model editing methods.Our method also excels in generation fluency and quality with the lowest generation perplexity and the highest GPT-4 evaluation scores.

BibTeX
@inproceedings{zhang-etal-2024-p4,
    title = "P4: Plug-and-Play Discrete Prompting for Large Language Models Personalization",
    author = "Zhang, Yuansen  and
      Wang, Xiao  and
      Chen, Tianze  and
      Fu, Jiayi  and
      Gui, Tao  and
      Zhang, Qi",
    editor = "Ku, Lun-Wei  and
      Martins, Andre  and
      Srikumar, Vivek",
    booktitle = "Findings of the Association for Computational Linguistics: ACL 2024",
    month = aug,
    year = "2024",
    address = "Bangkok, Thailand",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2024.findings-acl.541/",
    doi = "10.18653/v1/2024.findings-acl.541",
    pages = "9129--9144"
}
P4: Plug-and-Play Discrete Prompting for Large Language Models Personalization · ACL 2024