When generating code with LLMs, validate your test cases first and use mutual code-test scoring rather than trusting individual tests—this prevents bad tests from misleading code optimization and conflicting signals from hindering selection.
MineValiCoder improves LLM-based code generation by addressing test quality and code selection reliability. It uses three modules: filtering faulty tests through self-validation, iteratively refining code with validated feedback, and using a bipartite graph to score code-test interactions for stable selection. The approach achieves state-of-the-art results on multiple benchmarks.