English

In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning

Computation and Language 2023-08-09 v1 Artificial Intelligence Machine Learning

Abstract

In this note, we explore inference-time alignment through in-context learning. We consider a vanilla pretrained language model Llama-2 before any fine-tuning and retrieve an average of 9 demonstration alignment examples when the model is prompted to follow chat-style instructions. Compared to direct prompting, the in-context alignment without changing model weights leads to a 7x increase in win-rate w.r.t. the text-davinci-003 model from OpenAI, making the vanilla language model comparable to strong baselines with alignment fine-tuning.

Keywords

Cite

@article{arxiv.2308.04275,
  title  = {In-Context Alignment: Chat with Vanilla Language Models Before Fine-Tuning},
  author = {Xiaochuang Han},
  journal= {arXiv preprint arXiv:2308.04275},
  year   = {2023}
}
R2 v1 2026-06-28T11:50:53.020Z