IJCAI 20250 citations

In-context Learning Demonstration Generation with Text Distillation

Wuyuqing Wang, Erkun Yang, Zilan Zhou, Cheng Deng

Abstract

In-context learning (ICL), a paradigm derived from large language models (LLMs), holds significant promise but is notably sensitive to the choice of input demonstrations. While numerous methodologies have been developed to select the optimal demonstrations from existing datasets, our work alternatively proposes to generate representative demonstrations through a Distillation-based Demonstration Generation (DDG) framework. Specifically, our approach aims to generate demonstrations that encapsulate the essential attributes of the target dataset. Rather than optimizing these demonstrations directly, we design a generative model and try to refine it by minimizing the discrepancies between the calculative models trained on generated demonstrations and the original datasets respectively. Additionally, we leverage a teacher-student framework to stabilize the training process and improve the quality of the synthesized samples. Extensive experiments conducted across ten prevalent text datasets demonstrate that our DDG method substantially outperforms existing state-of-the-art methodologies. Our code will be available at https://github.com/wwyq1/DDG.

BibTeX
@inproceedings{ijcai2025_incontextlearnin,
  title = {In-context Learning Demonstration Generation with Text Distillation},
  author = {Wuyuqing Wang and Erkun Yang and Zilan Zhou and Cheng Deng},
  booktitle = {IJCAI 2025},
  year = {2025}
}
In-context Learning Demonstration Generation with Text Distillation · IJCAI 2025