mlsanityData to 7 Oct 2026

Leveraging Metamemory Agent for Enhanced Data-Free Code Generation in Large Language Models

arXiv 2501.07892 ↗First posted 14 Jan 2025cs.SE cs.AIcited by 3

On the map: LLM agents and tool use → Software engineering coding agents

Abstract (arXiv)

Large language models (LLMs) have shown strong performance in automated code generation, with few-shot prompting widely used for its simplicity and effectiveness. However, few-shot methods depend on curated or manually crafted reference examples, limiting their applicability in data-free coding scenarios such as real-world data-free coding scenarios and benchmarks without training sets. Existing methods that generate reference examples via recitation or analogy cannot guarantee their authenticity or accuracy. Inspired by human metamemory, we propose a novel metamemory agent to enhance one-time code generation in data-free coding scenarios. The agent guides LLMs to recall relevant prior knowledge, evaluate confidence in recalled information, and selectively exploit reliable content for problem solving. This agent removes the need for external reference examples, improves the authenticity and accuracy of recalled knowledge, and adaptively tailors the recall&evaluation process to each task. Extensive experiments demonstrate that the proposed metamemory agent significantly improves one-time code generation quality across data-free coding scenarios. The AI contribution is the metamemory agent, which makes self-recalled examples reliable through confidence evaluation and selection; the engineering application is data-free automated code generation, validated on eight public benchmarks.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 42 of its 70 references that are in the map. First posted on arXiv 14 Jan 2025.

Builds on

42 of 70 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024SpecRover: Code Intent Extraction via LLMs5 Aug

Other references · 41

  1. 2023GPT-4 Technical Reportcited by 18,132
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  4. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  5. 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
  6. 2021Program Synthesis with Large Language Modelscited by 3,509
  7. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  8. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  9. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  10. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  11. 2024Qwen2.5-Coder Technical Reportcited by 1,151
  12. 2019Self-Supervised Learning of Pretext-Invariant Representationscited by 806
29 more
  1. 2020Self-supervised Learning: Generative or Contrastivecited by 693
  2. 2023Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Modelscited by 550
  3. 2021Recent Advances in Natural Language Processing via Large Pre-Trained Language Models: A Surveycited by 457
  4. 2024InternLM2 Technical Reportcited by 391
  5. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  6. 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 294
  7. 2023Prompting Large Language Model for Machine Translation: A Case Studycited by 247
  8. 2023Adapted Large Language Models Can Outperform Medical Experts in Clinical Text Summarizationcited by 244
  9. 2022Selective Annotation Makes Language Models Better Few-Shot Learnerscited by 242
  10. 2023An Empirical Evaluation of Using Large Language Models for Automated Unit Test Generationcited by 193
  11. 2019SPoC: Search-based Pseudocode to Codecited by 176
  12. 2022Self-Adaptive In-Context Learning: An Information Compression Perspective for In-Context Example Selection and Orderingcited by 158
  13. 2023Towards Making the Most of ChatGPT for Machine Translationcited by 138
  14. 2023Self-planning Code Generation with Large Language Modelscited by 121
  15. 2023Large Language Models as Analogical Reasonerscited by 107
  16. 2022Automated Repair of Programs from Large Language Modelscited by 71
  17. 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
  18. 2022Recitation-Augmented Language Modelscited by 65
  19. 2024Revisiting Demonstration Selection Strategies in In-Context Learningcited by 57
  20. 2023SheetCopilot: Bringing Software Productivity to the Next Level through Large Language Modelscited by 53
  21. 2024A Performance Study of LLM-Generated Code on Leetcodecited by 48
  22. 2024LLM-Based Test-Driven Interactive Code Generation: User Study and Empirical Evaluationcited by 46
  23. 2022Code Generation Tools (Almost) for Free? A Study of Few-Shot, Pre-Trained Language Models on Codecited by 39
  24. 2024CYCLE: Learning to Self-Refine the Code Generationcited by 39
  25. 2023StudentEval: A Benchmark of Student-Written Prompts for Large Language Models of Codecited by 32
  26. 2023Teaching Language Models to Self-Improve through Interactive Demonstrationscited by 26
  27. 2023ChatCoder: Chat-based Refine Requirement Improves LLMs' Code Generationcited by 13
  28. 2024OOP: Object-Oriented Programming Evaluation Benchmark for Large Language Modelscited by 8
  29. 2024Refactoring Deep Learning Code: A Study of Practices and Unsatisfied Tool Needscited by 3

Built on by

Cited by year

Citing papers per year: 2025: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024MapCoder: Multi-Agent Code Generation for Competitive Problem Solving
  2. 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency
  3. 2025A Self-Improving Coding Agent
  4. 2025CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation
  5. 2025TALM: Dynamic Tree-Structured Multi-Agent Framework with Long-Term Memory for Scalable Code Generation
  6. 2023AgentCoder: Multi-Agent-based Code Generation with Iterative Testing and Optimisation
  7. 2025MapCoder-Lite: Distilling Multi-Agent Coding into a Single Small LLM
  8. 2025Learning to Solve and Verify: A Self-Play Framework for Code and Test Generation