REPOCOD, proposed in this paper, proves LLMs can't replace programmers yet by testing real-world coding scenarios
π https://arxiv.org/abs/2410.21647
π― Original Problem:
Existing benchmarks show LLMs achieve >90% accuracy in code generation, raising the question: Can they replace human programmers? Current benchmarks use simple, single-line or manually crafted problems that don't reflect real-world software development complexity.
-----
π οΈ Solution in this Paper:
β Created REPOCOD: A benchmark with 980 code generation problems from 11 popular Python projects. Including complex, real-world code completion tasks from actual projects
And having longer code solutions (331.6 tokens on average)
β 58% problems require file/repository-level context understanding
β Each instance includes ~313 developer-written test cases for validation
β Uses 3-stage automated pipeline: repository selection, target function selection, test case collection
β Average solution length: 331.6 tokens (longest among existing benchmarks)
β Average cyclomatic complexity: 9.00 (highest among benchmarks)
-----
π Key Insights:
β LLMs struggle with repository-level context (max 20% pass@1)
β Current-file context works better than Dense/BM25 retrieval for commercial models
β Each model has unique solvable problems, showing REPOCOD's diversity
β Repository-level code generation needs significant improvement
-----
π Results:
β No model achieved more than 30% pass@1 accuracy
β GPT-4 performed best with 27.35% pass@1
β Performance drops significantly for problems requiring repository-level context
β Commercial models outperform open-source ones consistently










