A Retrieve-and-Edit Framework for Predicting Structured Outputs
Not on the map. Why?
Abstract (arXiv)
For the task of generating complex outputs such as source code, editing existing outputs can be easier than generating complex outputs from scratch. With this motivation, we propose an approach that first retrieves a training example based on the input (e.g., natural language description) and then edits it to the desired output (e.g., code). Our contribution is a computationally efficient method for learning a retrieval model that embeds the input in a task-dependent way without relying on a hand-crafted metric or incurring the expense of jointly training the retriever with the editor. Our retrieve-and-edit framework can be applied on top of any base model. We show that on a new autocomplete task for GitHub Python code and the Hearthstone cards benchmark, retrieve-and-edit significantly boosts the performance of a vanilla sequence-to-sequence model on both tasks.
Key facts. Cited by 73 papers in the map (data through 14 Oct 2026). First posted on arXiv 4 Dec 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2020: 2; 2021: 19; 2022: 23; 2023: 12; 2024: 12; 2025: 4; 2026: 1.
73 papers.
Sort:
By area:
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
- 2021Constrained Language Models Yield Few-Shot Semantic Parserscited by 163
- 2022A Survey on Retrieval-Augmented Text Generationcited by 158
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 153
- 2021Retrieval Augmented Code Generation and Summarizationcited by 149
- 2022Retrieval-Augmented Multimodal Language Modelingcited by 125
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 119
- 2021Self-Attention Between Datapoints: Going Beyond Individual Input-Output Pairs in Deep Learningcited by 113
- 2021Case-based Reasoning for Natural Language Queries over Knowledge Basescited by 107
38 more
- 2023Lift Yourself Up: Retrieval-augmented Text Generation with Self Memorycited by 103
- 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 85
- 2021Improving Named Entity Recognition by External Context Retrieving and Cooperative Learningcited by 76
- 2021Neural Machine Translation with Monolingual Translation Memorycited by 61
- 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
- 2024Revisiting Demonstration Selection Strategies in In-Context Learningcited by 58
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 47
- 2022Retrieval-Enhanced Machine Learningcited by 47
- 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 44
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completioncited by 40
- 2021Controllable Semantic Parsing via Retrieval Augmentationcited by 35
- 2021StylePTB: A Compositional Benchmark for Fine-grained Controllable Text Style Transfercited by 34
- 2022Knowledge Base Question Answering by Case-based Reasoning over Subgraphscited by 31
- 2021Sequence-to-Sequence Learning with Latent Neural Grammarscited by 30
- 2023PoET: A generative model of protein families as sequences-of-sequencescited by 29
- 2023Copy Is All You Needcited by 27
- 2022Novelty Controlled Paraphrase Generation with Retrieval Augmented Conditional Prompt Tuningcited by 25
- 2023AceCoder: Utilizing Existing Code to Enhance Code Generationcited by 25
- 2021Exploiting Cross-Modal Prediction and Relation Consistency for Semi-Supervised Image Captioningcited by 23
- 2021RetGen: A Joint framework for Retrieval and Grounded Text Generation Modelingcited by 22
- 2022AmbiPun: Generating Humorous Puns with Ambiguous Contextcited by 21
- 2022ExPUNations: Augmenting Puns with Keywords and Explanationscited by 21
- 2022NewsEdits: A News Article Revision Dataset and a Document-Level Reasoning Challengecited by 20
- 2025RealRAG: Retrieval-augmented Realistic Image Generation via Self-reflective Contrastive Learningcited by 20
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunitiescited by 18
- 2021SHARE: a System for Hierarchical Assistive Recipe Editingcited by 15
- 2024Accelerating Retrieval-Augmented Generationcited by 14
- 2024MeMemo: On-device Retrieval Augmentation for Private and Personalized Text Generationcited by 13
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generationcited by 11
- 2022A Unified Framework for Pun Generation with Humor Principlescited by 10
- 2023De-fine: Decomposing and Refining Visual Programs with Auto-Feedbackcited by 10
- 2024Retrieval is Accurate Generationcited by 10
- 2022TegTok: Augmenting Text Generation via Task-specific and Open-world Knowledgecited by 9
- 2021Capturing Structural Locality in Non-parametric Language Modelscited by 8
- 2022Fix Bugs with Transformer through a Neural-Symbolic Edit Grammarcited by 8
- 2024VIMI: Grounding Video Generation through Multi-modal Instructioncited by 8
- 2022Diverse Parallel Data Synthesis for Cross-Database Adaptation of Text-to-SQL Parserscited by 7
50 most cited of 73 All 73 (JSON)
- 2026CODESTRUCT: Code Agents over Structured Action Spaces7 Apr 2026
- 2025CRMAgent: A Multi-Agent LLM System for E-Commerce CRM Message Template Generation11 Jul 2025
- 2025GraphPrompter: Multi-stage Adaptive Prompt Optimization for Graph In-Context Learning4 May 2025
- 2025RealRAG: Retrieval-augmented Realistic Image Generation via Self-reflective Contrastive Learning2 Feb 2025
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities23 Jan 2025
- 2024Accelerating Retrieval-Augmented Generation14 Dec 2024
- 2024Learning Metadata-Agnostic Representations for Text-to-SQL In-Context Example Selection17 Oct 2024
- 2024How to Make LMs Strong Node Classifiers?3 Oct 2024
- 2024mathbbUSCD: Improving Code Generation of LLMs by Uncertainty-Aware Selective Contrastive Decoding9 Sep 2024
- 2024VIMI: Grounding Video Generation through Multi-modal Instruction8 Jul 2024
- 2024MeMemo: On-device Retrieval Augmentation for Private and Personalized Text Generation2 Jul 2024
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion30 May 2024
38 more
- 2024Semi-Supervised Image Captioning Considering Wasserstein Graph Matching26 Mar 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024Retrieval is Accurate Generation27 Feb 2024
- 2024Mafin: Enhancing Black-Box Embeddings with Model Augmented Fine-Tuning19 Feb 2024
- 2024Revisiting Demonstration Selection Strategies in In-Context Learning22 Jan 2024
- 2023De-fine: Decomposing and Refining Visual Programs with Auto-Feedback21 Nov 2023
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair12 Sep 2023
- 2023Copy Is All You Need13 Jul 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023PoET: A generative model of protein families as sequences-of-sequences9 Jun 2023
- 2023Fine-grained Text Style Transfer with Diffusion-Based Language Models31 May 2023
- 2023Neural Machine Translation for Code Generation22 May 2023
- 2023Lift Yourself Up: Retrieval-augmented Text Generation with Self Memory3 May 2023
- 2023AceCoder: Utilizing Existing Code to Enhance Code Generation31 Mar 2023
- 2023Retrieving Multimodal Information for Augmented Generation: A Survey20 Mar 2023
- 2023Unleashing the True Potential of Sequence-to-Sequence Models for Sequence Tagging and Structure Parsing5 Feb 2023
- 2023Structured Case-based Reasoning for Inference-time Adaptation of Text-to-SQL parsers10 Jan 2023
- 2022Generation-Augmented Query Expansion For Code Retrieval20 Dec 2022
- 2022Retrieval-Augmented Multimodal Language Modeling22 Nov 2022
- 2022Nano: Nested Human-in-the-Loop Reward Learning for Few-shot Language Model Control10 Nov 2022
- 2022Diverse Parallel Data Synthesis for Cross-Database Adaptation of Text-to-SQL Parsers29 Oct 2022
- 2022Context-Situated Pun Generation24 Oct 2022
- 2022ExPUNations: Augmenting Puns with Keywords and Explanations24 Oct 2022
- 2022A Unified Framework for Pun Generation with Humor Principles24 Oct 2022
- 2022Incorporating Domain Knowledge through Task Augmentation for Front-End JavaScript Code Generation22 Aug 2022
- 2022CoditT5: Pretraining for Source Code and Natural Language Editing10 Aug 2022
- 2022DocPrompting: Generating Code by Retrieving the Docs13 Jul 2022
- 2022Hierarchical Context Tagging for Utterance Rewriting22 Jun 2022
- 2022NewsEdits: A News Article Revision Dataset and a Document-Level Reasoning Challenge14 Jun 2022
- 2022AmbiPun: Generating Humorous Puns with Ambiguous Context4 May 2022
- 2022Retrieval-Enhanced Machine Learning2 May 2022
- 2022Fix Bugs with Transformer through a Neural-Symbolic Edit Grammar13 Apr 2022
- 2022TegTok: Augmenting Text Generation via Task-specific and Open-world Knowledge16 Mar 2022
- 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar 2022
- 2022Compilable Neural Code Generation with Compiler Feedback10 Mar 2022
- 2022Knowledge Base Question Answering by Case-based Reasoning over Subgraphs22 Feb 2022
- 2022TURNER: The Uncertainty-based Retrieval Framework for Chinese NER18 Feb 2022
- 2022A Survey on Retrieval-Augmented Text Generation2 Feb 2022
50 newest of 73 All 73 (JSON)
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,297
- 2020REALM: Retrieval-Augmented Language Model Pre-Trainingcited by 2,141
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
- 2022A Survey on Retrieval-Augmented Text Generationcited by 158
- 2021Retrieval Augmented Code Generation and Summarizationcited by 149
- 2022ReACC: A Retrieval-Augmented Code Completion Frameworkcited by 119
- 2023Lift Yourself Up: Retrieval-augmented Text Generation with Self Memorycited by 103
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repaircited by 44
- 2022Novelty Controlled Paraphrase Generation with Retrieval Augmented Conditional Prompt Tuningcited by 25
- 2025RealRAG: Retrieval-augmented Realistic Image Generation via Self-reflective Contrastive Learningcited by 20
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunitiescited by 18
- 2024Accelerating Retrieval-Augmented Generationcited by 14
12 most cited of 14 All 14 (JSON)
- 2025RealRAG: Retrieval-augmented Realistic Image Generation via Self-reflective Contrastive Learning2 Feb 2025
- 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities23 Jan 2025
- 2024Accelerating Retrieval-Augmented Generation14 Dec 2024
- 2024MeMemo: On-device Retrieval Augmentation for Private and Personalized Text Generation2 Jul 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024Mafin: Enhancing Black-Box Embeddings with Model Augmented Fine-Tuning19 Feb 2024
- 2023RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic Program Repair12 Sep 2023
- 2023Lift Yourself Up: Retrieval-augmented Text Generation with Self Memory3 May 2023
- 2022ReACC: A Retrieval-Augmented Code Completion Framework15 Mar 2022
- 2022A Survey on Retrieval-Augmented Text Generation2 Feb 2022
- 2022Novelty Controlled Paraphrase Generation with Retrieval Augmented Conditional Prompt Tuning1 Feb 2022
- 2021Retrieval Augmented Code Generation and Summarization26 Aug 2021
12 newest of 14 All 14 (JSON)
- 2022Retrieval-Augmented Multimodal Language Modelingcited by 125
- 2022Retrieval-Augmented Multimodal Language Modeling22 Nov 2022
- 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
- 2021Constrained Language Models Yield Few-Shot Semantic Parserscited by 163
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 153
- 2021Self-Attention Between Datapoints: Going Beyond Individual Input-Output Pairs in Deep Learningcited by 113
- 2021Case-based Reasoning for Natural Language Queries over Knowledge Basescited by 107
- 2023Retrieving Multimodal Information for Augmented Generation: A Surveycited by 85
- 2021Improving Named Entity Recognition by External Context Retrieving and Cooperative Learningcited by 76
- 2021Neural Machine Translation with Monolingual Translation Memorycited by 61
- 2022Neuro-Symbolic Language Modeling with Automaton-augmented Retrievalcited by 60
- 2024Revisiting Demonstration Selection Strategies in In-Context Learningcited by 58
- 2022Compilable Neural Code Generation with Compiler Feedbackcited by 47
- 2022Retrieval-Enhanced Machine Learningcited by 47
12 most cited of 51 All 51 (JSON)
- 2025GraphPrompter: Multi-stage Adaptive Prompt Optimization for Graph In-Context Learning4 May 2025
- 2024Learning Metadata-Agnostic Representations for Text-to-SQL In-Context Example Selection17 Oct 2024
- 2024How to Make LMs Strong Node Classifiers?3 Oct 2024
- 2024mathbbUSCD: Improving Code Generation of LLMs by Uncertainty-Aware Selective Contrastive Decoding9 Sep 2024
- 2024Dataflow-Guided Retrieval Augmentation for Repository-Level Code Completion30 May 2024
- 2024Semi-Supervised Image Captioning Considering Wasserstein Graph Matching26 Mar 2024
- 2024Retrieval is Accurate Generation27 Feb 2024
- 2024Revisiting Demonstration Selection Strategies in In-Context Learning22 Jan 2024
- 2023De-fine: Decomposing and Refining Visual Programs with Auto-Feedback21 Nov 2023
- 2023Copy Is All You Need13 Jul 2023
- 2023An Exploratory Literature Study on Sharing and Energy Use of Language Models for Source Code5 Jul 2023
- 2023PoET: A generative model of protein families as sequences-of-sequences9 Jun 2023
12 newest of 51 All 51 (JSON)