Saved in:
Bibliographic Details
Main Authors: Lin, Yukang, Zhong, Bingchen, Jiang, Shuoran, Siebert, Joanna, Chen, Qingcai
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2409.11147
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916519468859392
author Lin, Yukang
Zhong, Bingchen
Jiang, Shuoran
Siebert, Joanna
Chen, Qingcai
author_facet Lin, Yukang
Zhong, Bingchen
Jiang, Shuoran
Siebert, Joanna
Chen, Qingcai
contents Large language models (LLMs) have exhibited remarkable few-shot learning capabilities and unified the paradigm of NLP tasks through the in-context learning (ICL) technique. Despite the success of ICL, the quality of the exemplar demonstrations can significantly influence the LLM's performance. Existing exemplar selection methods mainly focus on the semantic similarity between queries and candidate exemplars. On the other hand, the logical connections between reasoning steps can be beneficial to depict the problem-solving process as well. In this paper, we proposes a novel method named Reasoning Graph-enhanced Exemplar Retrieval (RGER). RGER first quires LLM to generate an initial response, then expresses intermediate problem-solving steps to a graph structure. After that, it employs graph kernel to select exemplars with semantic and structural similarity. Extensive experiments demonstrate the structural relationship is helpful to the alignment of queries and candidate exemplars. The efficacy of RGER on math and logit reasoning tasks showcases its superiority over state-of-the-art retrieval-based approaches. Our code is released at https://github.com/Yukang-Lin/RGER.
format Preprint
id arxiv_https___arxiv_org_abs_2409_11147
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Reasoning Graph Enhanced Exemplars Retrieval for In-Context Learning
Lin, Yukang
Zhong, Bingchen
Jiang, Shuoran
Siebert, Joanna
Chen, Qingcai
Computation and Language
Large language models (LLMs) have exhibited remarkable few-shot learning capabilities and unified the paradigm of NLP tasks through the in-context learning (ICL) technique. Despite the success of ICL, the quality of the exemplar demonstrations can significantly influence the LLM's performance. Existing exemplar selection methods mainly focus on the semantic similarity between queries and candidate exemplars. On the other hand, the logical connections between reasoning steps can be beneficial to depict the problem-solving process as well. In this paper, we proposes a novel method named Reasoning Graph-enhanced Exemplar Retrieval (RGER). RGER first quires LLM to generate an initial response, then expresses intermediate problem-solving steps to a graph structure. After that, it employs graph kernel to select exemplars with semantic and structural similarity. Extensive experiments demonstrate the structural relationship is helpful to the alignment of queries and candidate exemplars. The efficacy of RGER on math and logit reasoning tasks showcases its superiority over state-of-the-art retrieval-based approaches. Our code is released at https://github.com/Yukang-Lin/RGER.
title Reasoning Graph Enhanced Exemplars Retrieval for In-Context Learning
topic Computation and Language
url https://arxiv.org/abs/2409.11147