InfiBench: Evaluating the Question-Answering Capabilities of Code Large Language Models

Linyi Li, Shijie Geng, Zhenwen Li, Yibo He, Hao Yu, Ziyue Hua, Guanghan Ning, Siwei Wang, Tao Xie, Hongxia Yang

Introduction

InfiBench is a new large-scale benchmark designed to evaluate how well Large Language Models (LLMs) answer the diverse, free-form questions developers ask in the real world. Most existing code benchmarks, such as HumanEval or MBPP, are "narrow-bore," primarily testing code generation (e.g., "write a function that sorts a list"). While useful, these do not reflect the full reality of software development, where developers frequently ask about debugging, environment configuration, conceptual explanations, and API usage.

Furthermore, current benchmarks are hitting a saturation point where top models score over 90%, making it hard to distinguish between them. There is also growing concern about data contamination, where models might have seen benchmark solutions during training. InfiBench seeks to provide a more rigorous, diverse, and unsaturated evaluation of an LLM's true coding intelligence. It reveals that even top-tier models like GPT-4 still struggle with complex coding QA, scoring only around 70%.

Methodology and Dataset

The authors developed a "model-free" automatic evaluation framework. Instead of using another LLM to grade responses—which can be biased and expensive—they rely on objective metrics concretized by domain experts.

Overview of the InfiBench pipeline

The evaluation framework uses four main criteria:

  1. Keywords Matching: Checking for essential terms or regular expressions that must appear in a correct answer.
  2. Blank Filling: Forcing the model to follow a template to test instruction-following and specific technical knowledge.
  3. Unit Testing: For code-heavy answers, the response is executed against a suite of tests across nine different programming languages.
  4. Dialogue Similarity: Using ROUGE scores to compare the model's explanation against high-quality human reference answers from Stack Overflow.

The core dataset, InfiBench, was filtered from over 20 million Stack Overflow posts, resulting in 234 high-quality questions. To ensure the benchmark is robust against memorization, domain experts paraphrased the original questions into succinct, instruction-style prompts. The dataset spans 15 programming languages and 5 major domains (Front-End, Back-End, Data Science/ML, Mobile/Desktop, and IT Operations), offering a much broader spectrum of the software engineering landscape than Python-only or Data Science-only benchmarks.

Key Insights and Results

The authors conducted a massive evaluation of over 100 LLMs, yielding several important insights into current model capabilities.

InfiBench leaderboard and human baselines
  • The GPT-4 Ceiling: GPT-4 is the clear leader but is far from "solving" code QA. Its 70.64% score suggests significant room for improvement in handling diversified, real-world developer queries.
  • Open Source vs. Proprietary: While proprietary models like Claude 3 Opus (63.89%) and GPT-4 lead, open-source models such as DeepSeek-Coder-V2 (65.49%) and Codestral-22B are becoming highly competitive, even outperforming GPT-3.5.
  • The 40B Scaling Plateau: For open-source models, performance scales predictably with model size up to about 40 billion parameters, after which gains diminish significantly. This suggests that for very large models, data quality and training techniques matter more than raw parameter count.
  • Instruction Tuning is Non-Negotiable: Models that underwent an instruction-finetuning phase consistently outperformed their "base" counterparts on QA tasks, even if the base models were strong at pure code generation.
  • The "Over-Safeguarding" Trap: A surprising finding was that some large models performed poorly because they were too safe. They frequently refused to answer perfectly valid technical questions (like how to delete a configuration file) because they flagged them as potentially malicious.
  • Human Baseline: Interestingly, simply extracting the "officially accepted" answer from Stack Overflow yields a score of only 52.90% on their metrics, while the "highest-voted" human answers reach 65.18%. This highlights that top LLMs are now producing answers that are, by some metrics, more comprehensive than a single top human post.

Limitations and Future Work

At 234 questions, InfiBench is smaller than some generation-only benchmarks due to the high cost of expert manual annotation, though the authors plan to continuously expand it. Additionally, coding QA can sometimes have multiple "correct" paths; while cross-validation was used to ensure objectivity, some subjectivity in human-curated criteria is inevitable.

As InfiBench becomes public, there is a risk that future models will be trained on it. The authors released post IDs to help researchers deduplicate data, acknowledging this as an ongoing challenge for open benchmarks. Finally, the authors suggest exploring Retrieval-Augmented Generation (RAG) as a promising direction to improve model performance on these real-world questions.

Summary updated

BibTeX
@inproceedings{li2024infibench,
  author = {Linyi Li and Shijie Geng and Zhenwen Li and Yibo He and Hao Yu and Ziyue Hua and Guanghan Ning and Siwei Wang and Tao Xie and Hongxia Yang},
  title = {{InfiBench: Evaluating the Question-Answering Capabilities of Code Large Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
}
Figure