Ambiguity-Aware In-Context Learning with Large Language Models

Lingyu Gao, Aditi Chaudhary, Krishna Srinivasan, Kazuma Hashimoto, Karthik Raman +1 more
9/14/2023
cs.CLcs.IR

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

In-context learning (ICL) i.e. showing LLMs only a few task-specific demonstrations has led to downstream gains with no task-specific fine-tuning required. However, LLMs are sensitive to the choice of prompts, and therefore a crucial research question is how to select good demonstrations for ICL. One effective strategy is leveraging semantic similarity between the ICL demonstrations and test inputs by using a text retriever, which however is sub-optimal as that does not consider the LLM's existing knowledge about that task. From prior work (Lyu et al., 2023), we already know that labels paired with the demonstrations bias the model predictions. This leads us to our hypothesis whether considering LLM's existing knowledge about the task, especially with respect to the output label space can help in a better demonstration selection strategy. Through extensive experimentation on three text classification tasks, we find that it is beneficial to not only choose semantically similar ICL demonstrations but also to choose those demonstrations that help resolve the inherent label ambiguity surrounding the test example. Interestingly, we find that including demonstrations that the LLM previously mis-classified and also fall on the test example's decision boundary, brings the most performance gain.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{gao2023ambiguityaware,
  title  = {Ambiguity-Aware In-Context Learning with Large Language Models},
  author = {Lingyu Gao and Aditi Chaudhary and Krishna Srinivasan and Kazuma Hashimoto and Karthik Raman and Michael Bendersky},
  year   = {2023},
  eprint = {2309.07900},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.07900v2}
}

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/2309.07900.svg)](https://codeofpaper.com/paper/2309.07900)

Discussion