Introduction
While Large Language Models (LLMs) have demonstrated remarkable capabilities in generating standalone code snippets, real-world software engineering occurs within the context of massive, interconnected repositories. Most existing benchmarks, such as HumanEval or MBPP, focus on isolated "puzzles" that lack external dependencies. Furthermore, repository-level benchmarks have historically favored Python and Java, leaving foundational systems languages like C and C++ underserved.
YABLoCo (Yet Another Benchmark for Long Context) addresses this gap by providing a rigorous evaluation framework for code generation within large-scale C/C++ projects. By utilizing real-world repositories spanning up to 2 million lines of code (LoC), YABLoCo tests whether models can effectively navigate complex dependency webs and utilize their expansive context windows.
The YABLoCo Benchmark
The benchmark is built upon four prominent open-source repositories: llvm-project, bullet3, openssl, and redis. From these, the researchers curated a dataset of 215 functions, categorized by their dependency levels—ranging from standalone functions to those requiring cross-directory "project-level" calls. Unlike many existing datasets, YABLoCo includes full functional correctness testing (pass@k) specifically tailored for the C/C++ ecosystem.
Methodology and Quality Control
To ensure the benchmark's quality and difficulty, the authors employed a multi-stage filtering pipeline. Starting with over 158,000 functions, they narrowed the selection based on test coverage, comment availability, and code length.
Because C++ build environments are notoriously complex, the authors developed a scalable, Dockerized evaluation pipeline. This system ensures that every code candidate generated by an LLM is compiled and tested in a consistent, isolated environment to verify its functional correctness.
Key Insights and Results
The researchers evaluated several state-of-the-art models, including GPT-4 and DeepSeekCoder-33B. Several critical insights emerged from their analysis:
- The "Oracle" Advantage: Providing models with an "oracle" context—the actual code of all functions called by the target—resulted in a significant performance boost. For instance, DeepSeekCoder-33B’s performance jumped from 22.4% to 36.15% pass@10, even surpassing GPT-4's zero-context score.
- Context as a Distraction: For standalone functions, providing unnecessary repository context sometimes degraded performance. This suggests that the relevance of context is more important than the volume of context.
- Reasoning vs. Memorization: Using an "Exact Match" metric, the authors confirmed that models were generally not just regurgitating training data, validating the benchmark as a test of reasoning.
- Dependency Challenges: Models struggled significantly more with "project-level" dependencies (calls to distant parts of the repository) than with local "file-level" dependencies.
Conclusion and Future Work
YABLoCo provides a necessary step toward more realistic evaluations of LLMs in systems programming. While currently limited by a sample size of 215 functions and reliance on existing repository tests, the framework establishes a robust foundation for future expansion. Future iterations aim to mitigate potential data leakage through signature obfuscation and to increase the diversity of repositories and test cases.
Summary updated