Papers › Which Examples to Annotate for In-Context Learning? Towards Effective and Efficient Selection

Which Examples to Annotate for In-Context Learning? Towards Effective and Efficient Selection

30 Oct 2023arXiv:2310.20046archive 2025-07-28

Costas Mavromatis, Balasubramaniam Srinivasan, Zhengyuan Shen, Jiani Zhang, Huzefa Rangwala, Christos Faloutsos, George Karypis

Large Language Models (LLMs) can adapt to new tasks via in-context learning (ICL). ICL is efficient as it does not require any parameter updates to the trained LLM, but only few annotated examples as input for the LLM. In this work, we investigate an active learning approach for ICL, where there is a limited budget for annotating examples. We propose a model-adaptive optimization-free algorithm, termed AdaICL, which identifies examples that the model is uncertain about, and performs semantic diversity-based example selection. Diversity-based sampling improves overall effectiveness, while uncertainty sampling improves budget efficiency and helps the LLM learn new information. Moreover, AdaICL poses its sampling strategy as a Maximum Coverage problem, that dynamically adapts based on the model's feedback and can be approximately solved via greedy algorithms. Extensive experiments on nine datasets and seven LLMs show that AdaICL improves performance by 4.4% accuracy points over SOTA (7.7% relative improvement), is up to 3x more budget-efficient than performing annotations uniformly at random, while it outperforms SOTA with 2x fewer ICL examples.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.20046")

Code

Syntology Ran 12 of 15 code samples harvested from 1 repository linked to this paper; 3 have no recorded run. Of those that ran: 12 ran with no contract checked.

By repository: official repository: 15 samples from 1 repository, 12 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

amazon-science/adaptive-in-context-learning officialmentioned in paperpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

15 samples harvested; 12 ran; 0 honoured the contract we drafted; 3 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

12ran
3unverified

Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from amazon-science/adaptive-in-context-learning. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

cluster amazon-science/adaptive-in-context-learning/algorithms.py official repository ran Apache-2.0 (permissive) · a7424bb088354401 · report
density_max_coverage amazon-science/adaptive-in-context-learning/algorithms.py official repository ran Apache-2.0 (permissive) · 81689dc2c5f8dac8 · report
expand_to_aliases amazon-science/adaptive-in-context-learning/utils.py official repository ran Apache-2.0 (permissive) · d51ed70aaef3b5d0 · report
fast_votek_mod amazon-science/adaptive-in-context-learning/algorithms.py official repository ran Apache-2.0 (permissive) · d72b27f74858347a · report
format_dataset amazon-science/adaptive-in-context-learning/get_task.py official repository ran Apache-2.0 (permissive) · 82fab1f6e6bddec2 · report
get_checkpoint_id amazon-science/adaptive-in-context-learning/MetaICL/utils/utils.py official repository ran fingerprinted Apache-2.0 (permissive) · 1e0c778236fc89b1 · report
get_sub_answers amazon-science/adaptive-in-context-learning/utils.py official repository ran Apache-2.0 (permissive) · 91631e556572af73 · report
load_data amazon-science/adaptive-in-context-learning/MetaICL/utils/data.py official repository ran Apache-2.0 (permissive) · 6b6f0821fb467ba9 · report
prepro_sentence_pair amazon-science/adaptive-in-context-learning/MetaICL/metaicl/data.py official repository ran Apache-2.0 (permissive) · ab97d7d0b637c027 · report
prepro_sentence_pair_single amazon-science/adaptive-in-context-learning/MetaICL/metaicl/data.py official repository ran Apache-2.0 (permissive) · daece0094ff99380 · report
process_mnli_examples amazon-science/adaptive-in-context-learning/get_task.py official repository ran Apache-2.0 (permissive) · 071f4dd2f4d4b22c · report
process_rte_examples amazon-science/adaptive-in-context-learning/get_task.py official repository ran Apache-2.0 (permissive) · b775e4262bf408f6 · report
get_instance_length amazon-science/adaptive-in-context-learning/prompt_retrieval.py official repository unverified Apache-2.0 (permissive) · ddf793183ffe3659 · report
postprocess_text amazon-science/adaptive-in-context-learning/main_adaptive_phases.py official repository unverified Apache-2.0 (permissive) · eff19094fe0ec70e · report
setup_fp16 amazon-science/adaptive-in-context-learning/MetaICL/metaicl/model.py official repository unverified Apache-2.0 (permissive) · cbf1d84d85c303cc · report

Tasks

Active LearningDiversityIn-Context Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections