Codium-ai/AlphaCodium
A test-based, multi-stage, code-oriented iterative flow for improving LLM performance on competitive programming code generation tasks.

AlphaCodium implements a novel flow engineering approach that improves LLM code generation through iterative testing, self-verification, and code-focused reasoning. The method was validated on the CodeContests dataset of competitive programming problems, where it consistently improved results across multiple LLMs. For example, GPT-4 accuracy (pass@5) increased from 19% with a direct prompt to 44% using the AlphaCodium flow. The implementation is designed to be applicable beyond competitive programming to general code generation tasks.