Research map / Large language models / Language, safety and interpretability
kNN-ICL: Compositional Task-Oriented Parsing Generalization with Nearest Neighbor In-Context Learning
Wenting Zhao, Ye Liu, Yao Wan, Yibo Wang, Qingyang Wu, Zhongfen Deng, Jiangshu Du, Shuaiqi Liu, Yunlong Xu, Philip S. Yu
University of Illinois Chicago · Salesforce · Huazhong University of Science and Technology · Columbia University · The Hong Kong Polytechnic University · State University of New York at Binghamton
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| add kNN search (kNN-ICL) to ICL | GPT-NeoX · TOPv2 average, SPIS10 | exact match: 8.30 -> 14.52 | Improved |
| add kNN search (kNN-ICL) to ICL | CodeGen · TOPv2 average, SPIS10 | exact match: 8.66 -> 15.79 | Improved |
| add prompt demos to kNN-LM (kNN-ICL vs kNN-LM) | CodeGen · TOPv2 average, SPIS10 | exact match: 1.68 -> 15.79 | Improved |
| add kNN search to ICL-Retrieve with 2000-demo pool | CodeGen · TOPv2 average, 2000 demos | exact match: 43.58 -> 44.85 | Improved |
| add kNN search to ICL-Retrieve with 2000-demo pool | GPT-NeoX · TOPv2 average, 2000 demos | exact match: 42.48 -> 42.63 | No clear effect |
| add kNN search (kNN-ICL) to ICL at nesting depth 3 | CodeGen · TOPv2 Navigation depth 3 | exact match: 0.16 -> 4.98 | Improved |
| add API documentation to prompt (ablation) | GPT-NeoX · TOPv2 Navigation, unsupervised selection | exact match: 6.23 -> 4.04 | Hurt |
| add API documentation to prompt (ablation) | Codex · TOPv2 Navigation, unsupervised selection | exact match: 36.03 -> 39.23 | Improved |
| use unsupervised SentenceBERT instead of random exemplar selection (ablation) | Codex · TOPv2 Navigation, no documentation | exact match: 19.20 -> 36.03 | Improved |
| use supervised paraphrase selection instead of SentenceBERT, no documentation (ablation) | Codex · TOPv2 Navigation | exact match: 36.03 -> 37.54 | Mixed |
| use Codex kNN-ICL (estimated, similar demos) instead of fine-tuned RINE | Codex · TOPv2 average, SPIS10 | exact match: 35.94 -> 47.00 | Improved |
Later papers that compared with this method
1 later accepted paper reports KNN-ICL as a baseline in their results tables; 1 of them report a better number on most of the results they share with it.
- TestNUC: Enhancing Test-Time Computing Approaches and Scaling through Neighboring Unlabeled Data Consistency (ACL 2025 · better on 1 of 1 shared result)
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
Open problems in in-context learning analysis
Which in-context learning methods hold up beyond English classification on small open models, and what do they cost?
- Only a few small or medium open models were tested. · 14 papers state it
- The method needs many extra LLM calls or passes. · 13 papers state it
- Evaluated on English data only, with other languages untested. · 12 papers state it
Closest papers by meaning
- Compositional Semantic Parsing with Large Language Models (ICLR 2023 · similarity 0.91)
- An Empirical Analysis of Leveraging Knowledge for Low-Resource Task-Oriented Semantic Parsing (ACL 2023 · similarity 0.90)
- Leveraging Code to Improve In-Context Learning for Semantic Parsing (NAACL 2024 · similarity 0.89)
- ZEROTOP: Zero-Shot Task-Oriented Semantic Parsing using Large Language Models (EMNLP 2023 · similarity 0.89)
- Towards Auto-Regressive Next-Token Prediction: In-context Learning Emerges from Generalization (ICLR 2025 · similarity 0.87)
- Supervised Knowledge Makes Large Language Models Better In-context Learners (ICLR 2024 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.