Preprint · 2024 · Open access
Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering
arXiv · Published 16 January 2024 · DOI 10.48550/arxiv.2401.08500
In brief
“Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering” is a 2024 preprint by Tal Ridnik and 2 co-authors, published in arXiv. OpenAlex counts 230 citations as of 30 November 2026, which puts it in the top 1% of works published in 2024 by citations. It is open access under a CC BY licence: the full text is free to read at arXiv.
- Citations
- 230
- Most cited in
- 2026 (105)
- References
- 11
- Authors
- 3
Abstract
Code generation problems differ from common natural language problems - they require matching the exact syntax of the target language, identifying happy paths and edge cases, paying attention to numerous small details in the problem spec, and addressing other code-specific issues and requirements. Hence, many of the optimizations and tricks that have been successful in natural language generation may not be effective for code tasks. In this work, we propose a new approach to code generation by LLMs, which we call AlphaCodium - a test-based, multi-stage, code-oriented iterative flow, that improves the performances of LLMs on code problems. We tested AlphaCodium on a challenging code generation dataset called CodeContests, which includes competitive programming problems from platforms such as Codeforces. The proposed flow consistently and significantly improves results. On the validation set, for example, GPT-4 accuracy (pass@5) increased from 19% with a single well-designed direct prompt to 44% with the AlphaCodium flow. Many of the principles and best practices acquired in this work, we believe, are broadly applicable to general code generation tasks. Full implementation is available at: https://github.com/Codium-ai/AlphaCodium
Cite this paper
Formatted from the catalogue record. Check names, capitals and page numbers against the paper before you submit.
APA 7
Ridnik, T., Kredo, D., & Friedman, I. (2024). Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering. arXiv. https://doi.org/10.48550/arxiv.2401.08500
MLA 9
Ridnik, Tal, et al. “Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering.” arXiv, 2024. https://doi.org/10.48550/arxiv.2401.08500.
Chicago
Ridnik, Tal, Dedy Kredo, and Itamar Friedman. 2024. “Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering.” arXiv. https://doi.org/10.48550/arxiv.2401.08500.
Harvard
Ridnik, T., Kredo, D. and Friedman, I. (2024) ‘Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering’, arXiv. doi:10.48550/arxiv.2401.08500.
IEEE
T. Ridnik, D. Kredo, and I. Friedman, “Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering,” arXiv, 2024, doi: 10.48550/arxiv.2401.08500.
BibTeX
@misc{ridnik2024code,
title = {{Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering}},
author = {Ridnik, Tal and Kredo, Dedy and Friedman, Itamar},
howpublished = {arXiv},
year = {2024},
doi = {10.48550/arxiv.2401.08500},
url = {https://doi.org/10.48550/arxiv.2401.08500}
}
Download for a reference manager: BibTeX (.bib) · RIS for Zotero, Mendeley and EndNote (.ris)
Citations by year
| Year | Citations | Share of the best year |
|---|---|---|
| 2019 | 1 | |
| 2024 | 42 | |
| 2025 | 82 | |
| 2026 | 105 |
Topic and keywords
Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- code generation
- large language models
- prompt engineering
- competitive programming
- GPT-4
Work with this paper
Most-cited papers in Computer Science
- ImageNet classification with deep convolutional neural networksAlex Krizhevsky, Ilya Sutskever, Geoffrey E. Hinton · Communications of the ACM · 2017 · 114,726 citations
- Long Short-Term MemorySepp Hochreiter, Jürgen Schmidhuber · Neural Computation · 1997 · 109,097 citations
- A Mathematical Theory of CommunicationClaude E. Shannon · Bell System Technical Journal · 1948 · 91,736 citations
- Deep learningYann LeCun, Yoshua Bengio, Geoffrey E. Hinton · Nature · 2015 · 90,226 citations
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal NetworksShaoqing Ren, Kaiming He, Ross Girshick and 1 more · IEEE Transactions on Pattern Analysis and Machine Intelligence · 2016 · 74,143 citations
Questions about this paper
How do I cite this paper in APA style?
Ridnik, T., Kredo, D., & Friedman, I. (2024). Code Generation with AlphaCodium: From Prompt Engineering to Flow Engineering. arXiv. https://doi.org/10.48550/arxiv.2401.08500
How many times has this paper been cited?
230 times, according to OpenAlex on 30 November 2026. Google Scholar and Scopus count different sets of sources, so their numbers differ.
Is this paper free to read?
Yes. It is open access at arXiv: sign in and open the PDF from this page.
Who wrote this paper?
Tal Ridnik, Dedy Kredo, Itamar Friedman.
What is the DOI of this paper?
10.48550/arxiv.2401.08500, permanently at https://doi.org/10.48550/arxiv.2401.08500. Sign in and open it from this page.
Bibliographic data from OpenAlex (CC0), last checked 30 November 2026. ResearchGuru does not host this paper; once you are signed in, the links open it at the publisher or the repository that does.