Skip to content
DraconiticResearch
Search Sources API
186,086 studies31 sourcesUpdated 20 min ago
PreprintCC BY 4.0arXiv

Retrieval-Based In-Context Learning: A Domain Adaptation Framework

Abstract

In-context retrieval (ICR) is a retrieval-based form of in-context learning (ICL) in which demonstrations are retrieved from a source database based on similarity to the query, rather than sampled independently. In this work, we formulate ICR as a type of domain adaptation problem, where the source distribution P of the database may differ from the target distribution Q of the test query-label pair. We investigate the performance of ICR under a flexible class of distributional shifts that substantially extends prior work \citep{li2024fine,guo2025retrieval}, and establish theoretical guarantees that quantify the benefits and pitfalls of this learning paradigm. Our theory is verified by experiments on synthetic and language tasks.

Related

  1. Joint Contrastive-Adversarial Representation Learning for Unsupervised Domain Adaptation
    Yuling Jiao, Lican Kang, Jerry Zhijian Yang +2
    arXivPreprintarXiv licenceFull textStatisticsarXiv
  2. Synergistic Learning in Domain Adaptation with a Known Link: A Minimax Understanding
    Pengcheng Xiang, Ling Zhou, Yuhong Yang
    arXivPreprintarXiv licenceFull textStatisticsarXiv
  3. EntroPrefill: Renyi-Guided Context Pruning with Conditional Stability Guarantees for Retrieval-Augmented Generation
    Inbasekaran S
    arXivPreprintCC BY 4.0Full textStatisticsarXiv
  4. Targeted Retrieval, Compact Representations: How CoT Reasoning Improves Long-Context Counting
    Liang Twist Shan, Tianyu Hu, Hao Yan +1
    arXivPreprintCC BY 4.0Full textStatisticsarXiv
  5. A Domain-specific adaptation network for elliptic interface problems
    Jiaqi Luo, Hongmei Kang, Xingye Yue +1
    arXivPreprintarXiv licenceFull textNumerical analysis & scientific computingarXiv
BibTeX
@misc{zhu2026retrievalbased,
  title = {{Retrieval-Based In-Context Learning: A Domain Adaptation Framework}},
  author = {Yilun Zhu and Naihao Deng and Yingcong Li and Naichen Shi and Clayton Scott},
  howpublished = {arXiv},
  year = {2026},
  month = oct,
  doi = {10.48550/arxiv.2610.05717},
  eprint = {2610.05717},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.05717},
  note = {CC BY 4.0},
}
RIS
TY  - UNPB
TI  - Retrieval-Based In-Context Learning: A Domain Adaptation Framework
AU  - Yilun Zhu
AU  - Naihao Deng
AU  - Yingcong Li
AU  - Naichen Shi
AU  - Clayton Scott
PY  - 2026
DA  - 2026/10/12
PB  - arXiv
DO  - 10.48550/arxiv.2610.05717
UR  - https://arxiv.org/abs/2610.05717
AB  - In-context retrieval (ICR) is a retrieval-based form of in-context learning (ICL) in which demonstrations are retrieved from a source database based on similarity to the query, rather than sampled independently. In this work, we formulate ICR as a type of domain adaptation problem, where the source distribution P of the database may differ from the target distribution Q of the test query-label pair. We investigate the performance of ICR under a flexible class of distributional shifts that substantially extends prior work \citep{li2024fine,guo2025retrieval}, and establish theoretical guarantees that quantify the benefits and pitfalls of this learning paradigm. Our theory is verified by experiments on synthetic and language tasks.
ER  -