arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2509.23501cs.CLcs.AI

角色设计在大语言模型上下文学习中的影响

The Impact of Role Design in In-Context Learning for Large Language Models

Department of Electrical, Computer and Software Engineering(电气、计算机与软件工程系);Ontario Tech University(安大略技术大学)

Hamidreza Rouzegar, Masoud Makrehchi

AI总结:

本文研究提示中的角色设计对大语言模型 ICL 的影响,在零样本与少样本场景下用 GPT、Llama2 模型跨多类任务评估,发现角色化提示结构具有提升性能的潜力。

摘要:

上下文学习(ICL)使大语言模型(LLM)能够基于提示生成预测,而无需额外的微调。尽管提示工程已得到广泛研究,但提示中角色设计的影响仍未被充分探索。本研究使用 OpenAI 的 GPT-3.5 和 GPT-4o,以及 Meta 的 Llama2-7b 和 Llama2-13b,考察了零样本和少样本学习场景中角色配置的影响。我们跨数据集评估模型性能,重点关注情感分析、文本分类、问答和数学推理等任务。研究结果表明,基于角色的提示结构化具有提升 LLM 性能的潜力。

英文摘要:

In-context learning (ICL) enables Large Language Models (LLMs) to generate predictions based on prompts without additional fine-tuning. While prompt engineering has been widely studied, the impact of role design within prompts remains underexplored. This study examines the influence of role configurations in zero-shot and few-shot learning scenarios using GPT-3.5 and GPT-4o from OpenAI and Llama2-7b and Llama2-13b from Meta. We evaluate the models' performance across datasets, focusing on tasks like sentiment analysis, text classification, question answering, and math reasoning. Our findings suggest the potential of role-based prompt structuring to enhance LLM performance.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑