Papers › Crafting In-context Examples according to LMs' Parametric Knowledge

Crafting In-context Examples according to LMs' Parametric Knowledge

16 Nov 2023arXiv:2311.09579archive 2025-07-28

Yoonsang Lee, Pranav Atreya, Xi Ye, Eunsol Choi

In-context learning can improve the performances of knowledge-rich tasks such as question answering. In such scenarios, in-context examples trigger a language model (LM) to surface information stored in its parametric knowledge. We study how to better construct in-context example sets, based on whether the model is aware of the in-context examples. We identify 'known' examples, where models can correctly answer from their parametric knowledge, and 'unknown' ones. Our experiments show that prompting with 'unknown' examples decreases the performance, potentially as it encourages hallucination rather than searching for its parametric knowledge. Constructing an in-context example set that presents both known and unknown information performs the best across diverse settings. We perform analysis on three multi-answer question answering datasets, which allows us to further study answer set ordering strategies based on the LM's knowledge of each answer. Together, our study sheds light on how to best construct in-context example sets for knowledge-rich tasks.

PaperPDFCode

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

Code

lilys012/known_examples officialmentioned in papermentioned on GitHubpytorch 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

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

HallucinationIn-Context LearningLanguage ModelingLanguage ModellingQuestion Answering

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AWAREFocusSET

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