Language models are aligned to the collective voice of many, resulting in generic outputs that do not align with specific users' styles. In this work, we present Trial-Error-Explain In-Context Learning} (ITCL), a tuning-free method that personalizes language models for text generation tasks with fewer than 10 examples per user. TICL iteratively expands an in-context learning prompt via a trial-error-explain process, adding model-generated negative samples and explanations that provide fine-grained guidance towards a specific user's style. TICL achieves favorable win rates on pairwise comparisons with LLM-as-a-judge up to 91.5% against the previous state-of-the-art and outperforms competitive tuning-free baselines for personalized alignment tasks of writing emails, essays and news articles. Both lexical and qualitative analyses show that the negative samples and explanations enable language models to learn stylistic context more effectively and overcome the bias towards structural and formal phrases observed in their zero-shot outputs. By front-loading inference compute to create a user-specific in-context learning prompt that does not require extra generation steps at test time, TICL presents a novel yet simple approach for personalized alignment.
翻译:语言模型通常被对齐至多数用户的集体声音,导致其输出结果较为通用,难以契合特定用户的个人风格。本文提出基于试错解释的上下文学习(TICL),一种无需调优的方法,能够利用每位用户少于10个示例实现文本生成任务的个性化适配。TICL通过试错解释过程迭代扩展上下文学习提示,加入模型生成的负样本及解释说明,从而为特定用户风格提供细粒度指导。在与基于LLM评判的配对比较中,TICL相较于先前最优方法获得最高91.5%的胜率,并在电子邮件、论文及新闻稿件等个性化对齐任务中超越当前主流的免调优基线方法。词汇分析与定性评估均表明,负样本与解释说明能帮助语言模型更有效地学习风格化语境,并克服其在零样本输出中偏向结构化和正式短语的倾向。通过将推理计算前置以构建用户专属的上下文学习提示(测试时无需额外生成步骤),TICL为个性化对齐提供了一种新颖而简洁的实现路径。