EG-CFG
While the model writes a program line by line, beam search samples possible continuations, runs them on test cases, and feeds the execution results back into the prompt that steers the next tokens.
In one paragraph
EG-CFG (2025, code verification) uses verifier-guided repair, pairing generator DeepSeek-Coder 1.3B and DeepSeek-V3-0324 (no fine-tuning) with authority Test-case execution of beam-searched candidate completions. With DeepSeek-V3-0324, accuracy on MBPP rises from 82.8% for the plain model to 96.6%, and on MBPP-ET from 64.8% to 73.0%. Limit: the method needs executable test cases that exercise the target behaviour.
Verified against primary sources on · It matched its sources.
How does EG-CFG work?
- Proposes
Candidate completions of the program from the current line onward, sampled by beam search from a code LLM (DeepSeek-Coder 1.3B or DeepSeek-V3-0324)
- Judged by
A Python executor that runs each candidate against the task's test cases and records the execution trace and outcome
- Steers
The execution signals are written into a dynamic prompt, and classifier-free guidance mixes it with the plain prompt for every token of the next line; signals refresh at each line boundary
What did EG-CFG report?
With DeepSeek-V3-0324, accuracy on MBPP rises from 82.8% for the plain model to 96.6%, and on MBPP-ET from 64.8% to 73.0%; on CodeContests it reaches 60.6%.
What does EG-CFG not prove?
The method needs executable test cases that exercise the target behaviour, which real tasks often lack, and the beam search plus repeated execution adds inference cost over normal decoding (Section 6).
What a pass means here
The judge is a test, benchmark or score, so a pass means the candidate did well on those checks, not that it is right on every input. The loop runs each time an answer is needed.
See how this kind of check sits among the others: how to validate LLM output with code.
How it generalizes the harness
- Inverted control
- Intra-algorithmic surgery (inside the while-loop)
- Search over a population
- A domain authority judges
The decoding loop calls the model, not the other way round: execution results enter generation at every line, inside the token-level sampling procedure.
Classification
| Classification dimension | Verified value |
|---|---|
| What it proposes | Program |
| Generative model | DeepSeek-Coder 1.3B and DeepSeek-V3-0324 (no fine-tuning) |
| Algorithmic authority | Test-case execution of beam-searched candidate completions |
| Feedback | Test results |
| What gets updated | Prompt context and search tree |
| When it runs | At inference time |
| Validity | Empirical (measured) |
| Evidence | Code released |
| Lineage | Original system |