Saved in:
| Main Authors: | , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2025
|
| Subjects: | |
| Online Access: | https://arxiv.org/abs/2501.07892 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866915102235557888 |
|---|---|
| author | Wang, Shuai Ding, Liang Zhan, Yibing Luo, Yong He, Zheng Tao, Dapeng |
| author_facet | Wang, Shuai Ding, Liang Zhan, Yibing Luo, Yong He, Zheng Tao, Dapeng |
| contents | Automated code generation using large language models (LLMs) has gained attention due to its efficiency and adaptability. However, real-world coding tasks or benchmarks like HumanEval and StudentEval often lack dedicated training datasets, challenging existing few-shot prompting approaches that rely on reference examples. Inspired by human metamemory-a cognitive process involving recall and evaluation-we present a novel framework (namely M^2WF) for improving LLMs' one-time code generation. This approach enables LLMs to autonomously generate, evaluate, and utilize synthetic examples to enhance reliability and performance. Unlike prior methods, it minimizes dependency on curated data and adapts flexibly to various coding scenarios. Our experiments demonstrate significant improvements in coding benchmarks, offering a scalable and robust solution for data-free environments. The code and framework will be publicly available on GitHub and HuggingFace. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2501_07892 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | Leveraging Metamemory Mechanisms for Enhanced Data-Free Code Generation in LLMs Wang, Shuai Ding, Liang Zhan, Yibing Luo, Yong He, Zheng Tao, Dapeng Software Engineering Artificial Intelligence Automated code generation using large language models (LLMs) has gained attention due to its efficiency and adaptability. However, real-world coding tasks or benchmarks like HumanEval and StudentEval often lack dedicated training datasets, challenging existing few-shot prompting approaches that rely on reference examples. Inspired by human metamemory-a cognitive process involving recall and evaluation-we present a novel framework (namely M^2WF) for improving LLMs' one-time code generation. This approach enables LLMs to autonomously generate, evaluate, and utilize synthetic examples to enhance reliability and performance. Unlike prior methods, it minimizes dependency on curated data and adapts flexibly to various coding scenarios. Our experiments demonstrate significant improvements in coding benchmarks, offering a scalable and robust solution for data-free environments. The code and framework will be publicly available on GitHub and HuggingFace. |
| title | Leveraging Metamemory Mechanisms for Enhanced Data-Free Code Generation in LLMs |
| topic | Software Engineering Artificial Intelligence |
| url | https://arxiv.org/abs/2501.07892 |