Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
38 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Dr.ICL: Demonstration-Retrieved In-context Learning (2305.14128v1)

Published 23 May 2023 in cs.CL and cs.AI

Abstract: In-context learning (ICL), teaching a LLM to perform a task with few-shot demonstrations rather than adjusting the model parameters, has emerged as a strong paradigm for using LLMs. While early studies primarily used a fixed or random set of demonstrations for all test queries, recent research suggests that retrieving semantically similar demonstrations to the input from a pool of available demonstrations results in better performance. This work expands the applicability of retrieval-based ICL approaches by demonstrating that even simple word-overlap similarity measures such as BM25 outperform randomly selected demonstrations. Furthermore, we extend the success of retrieval-based ICL to instruction-finetuned LLMs as well as Chain-of-Thought (CoT) prompting. For instruction-finetuned LLMs, we find that although a model has already seen the training data at training time, retrieving demonstrations from the training data at test time yields better results compared to using no demonstrations or random demonstrations. Last but not least, we train a task-specific demonstration retriever that outperforms off-the-shelf retrievers.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (8)
  1. Man Luo (55 papers)
  2. Xin Xu (187 papers)
  3. Zhuyun Dai (26 papers)
  4. Panupong Pasupat (27 papers)
  5. Mehran Kazemi (26 papers)
  6. Chitta Baral (152 papers)
  7. Vaiva Imbrasaite (3 papers)
  8. Vincent Y Zhao (1 paper)
Citations (42)