HackerPapers

arXiv:2305.14688cs.CL

ExpertPrompting: Instructing Large Language Models to be Distinguished Experts

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

Abstract

The answering quality of an aligned large language model (LLM) can be drastically improved if treated with proper crafting of prompts. In this paper, we propose ExpertPrompting to elicit the potential of LLMs to answer as distinguished experts. We first utilize In-Context Learning to automatically synthesize detailed and customized descriptions of the expert identity for each specific instruction, and then ask LLMs to provide answer conditioned on such agent background. Based on this augmented prompting strategy, we produce a new set of instruction-following data using GPT-3.5, and train a competitive open-source chat assistant called ExpertLLaMA. We employ GPT4-based evaluation to show that 1) the expert data is of significantly higher quality than vanilla answers, and 2) ExpertLLaMA outperforms existing open-source opponents and achieves 96\% of the original ChatGPT's capability. All data and the ExpertLLaMA model will be made publicly available at https://github.com/OFA-Sys/ExpertLLaMA.

arXiv comments
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence

On Hacker News

Linked by 4 identifiable commenters in 4 comments across 4 threads, from Jan 2026 to Sep 2026.

Comments linking this paper, per year.

Discussed in comments4 threads

    • > has anyone found a good way to improve code quality? just wondering ... - keep prompts focused on atomic tasks. - use expert prompting[0] when possible. - require coding agents to verify changes. - require coding agents to create/update unit tests with 100% coverage. - use git…

      AdieuToLogicView on HNParent context

    • Back with some papers. (Apologies in advance; I typically don't edit/format comments much here, please bear with me.) Notable papers describing performance improvements with prescribed roles and personas: - ExpertPrompting: Instructing Large Language Models to be Distinguished…

      not_a_bot_4shoView on HNParent context

    • True, but nuanced. The model does not react to "you are an experienced programmer" kinds of prompts. It reacts to being given relevant information that needs to be reflected in the output. See examples in https://arxiv.org/abs/2305.14688; They certainly do say things like "You…

      jason_osterView on HNParent context

    • there's actually quite a bit of research in this field, here's a couple: "ExpertPrompting: Instructing Large Language Models to be Distinguished Experts" https://arxiv.org/abs/2305.14688 "Persona is a Double-edged Sword: Mitigating the Negative Impact of Role-playing Prompts in…

      electroglyphView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.