mlsanityData to 14 Oct 2026

RetICL: Sequential Retrieval of In-Context Examples with Reinforcement Learning

arXiv 2305.14502 ↗First posted 23 May 2023cs.CL cs.AI cs.LGcited by 24

Not on the map. Why?

Abstract (arXiv)

Recent developments in large pre-trained language models have enabled unprecedented performance on a variety of downstream tasks. Achieving best performance with these models often leverages in-context learning, where a model performs a (possibly new) task given one or more examples. However, recent work has shown that the choice of examples can have a large impact on task performance and that finding an optimal set of examples is non-trivial. While there are many existing methods for selecting in-context examples, they generally score examples independently, ignoring the dependency between them and the order in which they are provided to the model. In this work, we propose Retrieval for In-Context Learning (RetICL), a learnable method for modeling and optimally selecting examples sequentially for in-context learning. We frame the problem of sequential example selection as a Markov decision process and train an example retriever using reinforcement learning. We evaluate RetICL on math word problem solving and scientific question answering tasks and show that it consistently outperforms or matches heuristic and learnable baselines. We also use case studies to show that RetICL implicitly learns representations of problem solving strategies.

Key facts. Cited by 24 papers in the map (data through 14 Oct 2026). Builds on 33 of its 41 references that are in the map. First posted on arXiv 23 May 2023.

Builds on

33 of 41 references.

References · 33

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2017Proximal Policy Optimization Algorithmscited by 15,215
  3. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  4. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  5. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  6. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  7. 2020Measuring Massive Multitask Language Understandingcited by 7,963
  8. 2022Self-Consistency Improves Chain of Thought Reasoning in Language Modelscited by 5,708
  9. 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,371
  10. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
  11. 2017Billion-scale similarity search with GPUscited by 2,497
  12. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,234
21 more
  1. 2019Fine-Tuning Language Models from Human Preferencescited by 2,150
  2. 2015High-Dimensional Continuous Control Using Generalized Advantage Estimationcited by 2,026
  3. 2022Language Models (Mostly) Know What They Knowcited by 1,856
  4. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  5. 2022Solving Quantitative Reasoning Problems with Language Modelscited by 1,392
  6. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,256
  7. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  8. 2021Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivitycited by 1,135
  9. 2013Exact solutions to the nonlinear dynamics of learning in deep linear neural networkscited by 763
  10. 2021Learning To Retrieve Prompts for In-Context Learningcited by 648
  11. 2022Complexity-Based Prompting for Multi-Step Reasoningcited by 388
  12. 2022Dynamic Prompt Learning via Policy Gradient for Semi-structured Mathematical Reasoningcited by 350
  13. 2019QASC: A Dataset for Question Answering via Sentence Compositioncited by 252
  14. 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 243
  15. 2022Active Example Selection for In-Context Learningcited by 196
  16. 2018Understanding the impact of entropy on policy optimizationcited by 176
  17. 2020What Matters In On-Policy Reinforcement Learning? A Large-Scale Empirical Studycited by 162
  18. 2022Diverse Demonstrations Improve In-context Compositional Generalizationcited by 139
  19. 2020Provable Benefit of Orthogonal Initialization in Optimizing Deep Linear Networkscited by 73
  20. 2022Data Curation Alone Can Stabilize In-context Learningcited by 59
  21. 2023Boosted Prompt Ensembles for Large Language Modelscited by 36

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 3; 2024: 13; 2025: 5; 2026: 3.

24 papers.

Sort:

By area:

  1. 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
  2. 2024In-context Learning with Retrieved Demonstrations for Language Models: A Surveycited by 70
  3. 2025A Survey of Test-Time Compute: From Intuitive Inference to Deliberate Reasoningcited by 40
  4. 2023Can Multimodal Large Language Models Truly Perform Multimodal In-Context Learning?cited by 34
  5. 2023Fewer is More: Boosting LLM Reasoning with Reinforced Context Pruningcited by 26
  6. 2024DemoRank: Selecting Effective Demonstrations for Large Language Models in Ranking Taskcited by 17
  7. 2024Addressing Order Sensitivity of In-Context Demonstration Examples in Causal Language Modelscited by 12
  8. 2024CoPS: Empowering LLM Agents with Provable Cross-Task Experience Sharingcited by 12
  9. 2024In-Context Learning Demonstration Selection via Influence Analysiscited by 11
  10. 2024Math Multiple Choice Question Generation via Human-Large Language Model Collaborationcited by 9
  11. 2024Demonstration Selection for In-Context Learning via Reinforcement Learningcited by 8
  12. 2024Knowledge Tagging System on Math Questions via LLMs with Flexible Demonstration Retrievercited by 6
12 more
  1. 2025The Role of Diversity in In-Context Learning for Large Language Modelscited by 6
  2. 2025Relic: Enhancing Reward Model Generalization for Low-Resource Indic Languages with Few-Shot Examplescited by 6
  3. 2024Automatic Combination of Sample Selection Strategies for Few-Shot Learningcited by 5
  4. 2024PromptRefine: Enhancing Few-Shot Performance on Low-Resource Indic Languages with Example Selection from Related Example Bankscited by 5
  5. 2025Post-Incorporating Code Structural Knowledge into Pretrained Models via ICL for Code Translationcited by 3
  6. 2025Order Matters: Rethinking Prompt Construction in In-Context Learningcited by 3
  7. 2024GraphIC: A Graph-Based In-Context Example Retrieval Model for Multi-Step Reasoningcited by 2
  8. 2024Augmenting In-Context-Learning in LLMs via Automatic Data Labeling and Refinementcited by 1
  9. 2024PerkwE_COQA: Enhanced Persian Conversational Question Answering by combining contextual keyword extraction with Large Language Modelscited by 0
  10. 2026Meta-Sel: Efficient Demonstration Selection for In-Context Learning via Supervised Meta-Learningcited by 0
  11. 2026Downstream-Aware Context Selection for Online In-Context Reinforcement Learningcited by 0
  12. 2026Efficient Task Adaptation in Large Language Models: A Survey of Weight-Based, Prompt-Based, and Embedding-Based Adaptationscited by 0