RIDE: Enhancing Large Language Model Alignment through Restyled In-Context Learning Demonstration Exemplars

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Hua, Yuncheng, Qu, Lizhen, Li, Zhuang, Xue, Hao, Salim, Flora D., Haffari, Gholamreza
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866910859059527680
author Hua, Yuncheng
Qu, Lizhen
Li, Zhuang
Xue, Hao
Salim, Flora D.
Haffari, Gholamreza
author_facet Hua, Yuncheng
Qu, Lizhen
Li, Zhuang
Xue, Hao
Salim, Flora D.
Haffari, Gholamreza
contents Alignment tuning is crucial for ensuring large language models (LLMs) behave ethically and helpfully. Current alignment approaches require high-quality annotations and significant training resources. This paper proposes a low-cost, tuning-free method using in-context learning (ICL) to enhance LLM alignment. Through an analysis of high-quality ICL demos, we identified style as a key factor influencing LLM alignment capabilities and explicitly restyled ICL exemplars based on this stylistic framework. Additionally, we combined the restyled demos to achieve a balance between the two conflicting aspects of LLM alignment--factuality and safety. We packaged the restyled examples as prompts to trigger few-shot learning, improving LLM alignment. Compared to the best baseline approach, with an average score of 5.00 as the maximum, our method achieves a maximum 0.10 increase on the Alpaca task (from 4.50 to 4.60), a 0.22 enhancement on the Just-eval benchmark (from 4.34 to 4.56), and a maximum improvement of 0.32 (from 3.53 to 3.85) on the MT-Bench dataset. We release the code and data at https://github.com/AnonymousCode-ComputerScience/RIDE.
format Preprint
id arxiv_https___arxiv_org_abs_2502_11681
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle RIDE: Enhancing Large Language Model Alignment through Restyled In-Context Learning Demonstration Exemplars
Hua, Yuncheng
Qu, Lizhen
Li, Zhuang
Xue, Hao
Salim, Flora D.
Haffari, Gholamreza
Computation and Language
Artificial Intelligence
I.2.7
Alignment tuning is crucial for ensuring large language models (LLMs) behave ethically and helpfully. Current alignment approaches require high-quality annotations and significant training resources. This paper proposes a low-cost, tuning-free method using in-context learning (ICL) to enhance LLM alignment. Through an analysis of high-quality ICL demos, we identified style as a key factor influencing LLM alignment capabilities and explicitly restyled ICL exemplars based on this stylistic framework. Additionally, we combined the restyled demos to achieve a balance between the two conflicting aspects of LLM alignment--factuality and safety. We packaged the restyled examples as prompts to trigger few-shot learning, improving LLM alignment. Compared to the best baseline approach, with an average score of 5.00 as the maximum, our method achieves a maximum 0.10 increase on the Alpaca task (from 4.50 to 4.60), a 0.22 enhancement on the Just-eval benchmark (from 4.34 to 4.56), and a maximum improvement of 0.32 (from 3.53 to 3.85) on the MT-Bench dataset. We release the code and data at https://github.com/AnonymousCode-ComputerScience/RIDE.
title RIDE: Enhancing Large Language Model Alignment through Restyled In-Context Learning Demonstration Exemplars
topic Computation and Language
Artificial Intelligence
I.2.7
url https://arxiv.org/abs/2502.11681