Improving RAG for Personalization with Author Features and Contrastive Examples

Mert Yazan, Suzan Verberne, Frederik Situmeang
3/24/2025
cs.IRcs.AIcs.CL

No official code found. Best implementation: myazann/AP-Bots (3 stars, last commit 2025-03-31).

Abstract

Personalization with retrieval-augmented generation (RAG) often fails to capture fine-grained features of authors, making it hard to identify their unique traits. To enrich the RAG context, we propose providing Large Language Models (LLMs) with author-specific features, such as average sentiment polarity and frequently used words, in addition to past samples from the author's profile. We introduce a new feature called Contrastive Examples: documents from other authors are retrieved to help LLM identify what makes an author's style unique in comparison to others. Our experiments show that adding a couple of sentences about the named entities, dependency patterns, and words a person uses frequently significantly improves personalized text generation. Combining features with contrastive examples boosts the performance further, achieving a relative 15% improvement over baseline RAG while outperforming the benchmarks. Our results show the value of fine-grained features for better personalization, while opening a new research dimension for including contrastive examples as a complement with RAG. We release our code publicly.

View on arXivView PDF

Code Implementations(1)

myazann/AP-BotsCommunity100%
30PythonAug 20, 20241 years ago

Similar Papers

Cite this paper

@article{yazan2025improving,
  title  = {Improving RAG for Personalization with Author Features and Contrastive Examples},
  author = {Mert Yazan and Suzan Verberne and Frederik Situmeang},
  year   = {2025},
  eprint = {2504.08745},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.08745v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.08745.svg)](https://codeofpaper.com/paper/2504.08745)

Discussion