mlsanityData to 14 Oct 2026

Retrieval-Augmented Code Generation for Universal Information Extraction

arXiv 2311.02962 ↗First posted 6 Nov 2023cs.AI cs.CL cs.IRcited by 40

On the map: Retrieval-augmented generation → RAG for code

Abstract (arXiv)

Information Extraction (IE) aims to extract structural knowledge (e.g., entities, relations, events) from natural language texts, which brings challenges to existing methods due to task-specific schemas and complex text expressions. Code, as a typical kind of formalized language, is capable of describing structural knowledge under various schemas in a universal way. On the other hand, Large Language Models (LLMs) trained on both codes and texts have demonstrated powerful capabilities of transforming texts into codes, which provides a feasible solution to IE tasks. Therefore, in this paper, we propose a universal retrieval-augmented code generation framework based on LLMs, called Code4UIE, for IE tasks. Specifically, Code4UIE adopts Python classes to define task-specific schemas of various structural knowledge in a universal way. By so doing, extracting knowledge under these schemas can be transformed into generating codes that instantiate the predefined Python classes with the information in texts. To generate these codes more precisely, Code4UIE adopts the in-context learning mechanism to instruct LLMs with examples. In order to obtain appropriate examples for different tasks, Code4UIE explores several example retrieval strategies, which can retrieve examples semantically similar to the given texts. Extensive experiments on five representative IE tasks across nine datasets demonstrate the effectiveness of the Code4UIE framework.

Key facts. Cited by 40 papers in the map (data through 14 Oct 2026). Placed in RAG for code, one of 15 directions in Retrieval-augmented generation. Builds on 18 of its 31 references that are in the map. First posted on arXiv 6 Nov 2023.

Builds on

18 of 31 references.

References · 18

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  4. 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 981
  5. 2018Multi-Task Identification of Entities, Relations, and Coreference for Scientific Knowledge Graph Constructioncited by 322
  6. 2022Unified Structure Generation for Universal Information Extractioncited by 221
  7. 2023InstructUIE: Multi-task Instruction Tuning for Unified Information Extractioncited by 170
  8. 2023Evaluating ChatGPT's Information Extraction Capabilities: An Assessment of Performance, Explainability, Calibration, and Faithfulnesscited by 130
  9. 2023Revisiting Relation Extraction in the era of Large Language Modelscited by 102
  10. 2020Automated Concatenation of Embeddings for Structured Predictioncited by 86
  11. 2021DEGREE: A Data-Efficient Generation-Based Event Extraction Modelcited by 83
  12. 2022Code4Struct: Code Generation for Few-Shot Event Structure Predictioncited by 70
6 more
  1. 2023CodeIE: Large Code Generation Models are Better Few-Shot Information Extractorscited by 68
  2. 2021Packed Levitated Marker for Entity and Relation Extractioncited by 49
  3. 2023Universal Information Extraction as Unified Semantic Matchingcited by 48
  4. 2020FLERT: Document-Level Features for Named Entity Recognitioncited by 45
  5. 2018Assertion-based QA with Question-Aware Open Information Extractioncited by 7
  6. 2021Intelligent Online Selling Point Extraction for E-Commerce Recommendationcited by 6

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 2; 2024: 18; 2025: 16; 2026: 4.

40 papers.

Sort:

By area:

  1. 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
  2. 2023Large Language Models for Generative Information Extraction: A Surveycited by 185
  3. 2024RAGChecker: A Fine-grained Framework for Diagnosing Retrieval-Augmented Generationcited by 61
  4. 2025VideoRAG: Retrieval-Augmented Generation over Video Corpuscited by 57
  5. 2024KnowCoder: Coding Structured Knowledge into LLMs for Universal Information Extractioncited by 34
  6. 2024ADELIE: Aligning Large Language Models on Information Extractioncited by 24
  7. 2024C-ICL: Contrastive In-context Learning for Information Extractioncited by 23
  8. 2024EVOR: Evolving Retrieval for Code Generationcited by 22
  9. 2025Instruction-Tuning LLMs for Event Extraction with Annotation Guidelinescited by 18
  10. 2024A Simple but Effective Approach to Improve Structured Language Model Output for Information Extractioncited by 16
  11. 2024Debate as Optimization: Adaptive Conformal Prediction and Diverse Retrieval for Event Extractioncited by 10
  12. 2024LTNER: Large Language Model Tagging for Named Entity Recognition with Contextualized Entity Markingcited by 7
28 more
  1. 2025Adaptive Schema-aware Event Extraction with Retrieval-Augmented Generationcited by 7
  2. 2023GIELLM: Japanese General Information Extraction Large Language Model Utilizing Mutual Reinforcement Effectcited by 6
  3. 2024AgentRE: An Agent-Based Framework for Navigating Complex Information Landscapes in Relation Extractioncited by 6
  4. 2024Building A Coding Assistant via the Retrieval-Augmented Language Modelcited by 5
  5. 2024Retrieval Augmented Instruction Tuning for Open NER with Large Language Modelscited by 4
  6. 2025SACL: Understanding and Combating Textual Bias in Code Retrieval with Semantic-Augmented Reranking and Localizationcited by 4
  7. 2025EyeMulator: Improving Code Language Models by Mimicking Human Visual Attentioncited by 4
  8. 2024Embedded Named Entity Recognition using Probing Classifierscited by 3
  9. 2024KnowCoder-X: Boosting Multilingual Information Extraction via Codecited by 3
  10. 2025Schema as Parameterized Tools for Universal Information Extractioncited by 3
  11. 2025Towards Event Extraction with Massive Types: LLM-based Collaborative Annotation and Partitioning Extractioncited by 2
  12. 2025MPL: Multiple Programming Languages with Large Language Models for Information Extractioncited by 2
  13. 2025RA-Gen: A Controllable Code Generation Framework Using ReAct for Multi-Agent Task Executioncited by 2
  14. 2025Extracting Events Like Code: A Multi-Agent Programming Framework for Zero-Shot Event Extractioncited by 2
  15. 2024Is There a One-Model-Fits-All Approach to Information Extraction? Revisiting Task Definition Biasescited by 1
  16. 2025Biomedical Relation Extraction via Adaptive Document-Relation Cross-Mapping and Concept Unique Identifiercited by 1
  17. 2025KnowCoder-V2: Deep Knowledge Analysiscited by 1
  18. 2025A Semantic Parsing Framework for End-to-End Time Normalizationcited by 1
  19. 2025MemoCoder: Automated Function Synthesis using LLM-Supported Agentscited by 1
  20. 2024A Two Dimensional Feature Engineering Method for Relation Extractioncited by 0
  21. 2024Weak Reward Model Transforms Generative Models into Robust Causal Event Extraction Systemscited by 0
  22. 2024Can AI Extract Antecedent Factors of Human Trust in AI? An Application of Information Extraction for Scientific Literature in Behavioural and Computer Sciencescited by 0
  23. 2025Evaluation of LLM-based Strategies for the Extraction of Food Product Information from Online Shopscited by 0
  24. 2025Keyword-Centric Prompting for One-Shot Event Detection with Self-Generated Rationale Enhancementscited by 0
  25. 2026Code-MIE: A Code-style Model for Multimodal Information Extraction with Scene Graph and Entity Attribute Knowledge Enhancementcited by 0
  26. 2026ProUIE: A Macro-to-Micro Progressive Learning Method for LLM-based Universal Information Extractioncited by 0
  27. 2026Analysing Lightweight Large Language Models for Biomedical Named Entity Recognition on Diverse Ouput Formatscited by 0
  28. 2026LC-ICL: Label-Guided Contrastive In-Context Learning for Robust Information Extractioncited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024Retrieval-Augmented Generation-based Relation Extraction
  2. 2026Retrieval-Augmented Generation for Scientific Code Understanding
  3. 2025An Empirical Study of Retrieval-Augmented Code Generation: Challenges and Opportunities
  4. 2026Context-Augmented Code Generation Using Programming Knowledge Graphs
  5. 2025What to Retrieve for Effective Retrieval-Augmented Code Generation? An Empirical Study and Beyond
  6. 2024Context-Augmented Code Generation Using Programming Knowledge Graphs
  7. 2026SchemaRAG: Dynamic Large Schema Reduction for LLM-driven Structured Information Extraction
  8. 2025SelfRACG: Enabling LLMs to Self-Express and Retrieve for Code Generation