PROBE: Benchmarking Code Generation in Large Language Models

· Source: cs.SE updates on arXiv.org · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering, Data Science & Analytics · Depth: Expert, extended

Summary

PROBE is an extensible benchmark framework designed to systematically evaluate Large Language Models (LLMs) in automated code generation, addressing limitations of existing benchmarks that often target single languages or rely solely on unit test outcomes. It assesses LLM-generated code across three dimensions: functional correctness, proximity to valid solutions, and overall code quality. The framework was used to evaluate six models, including open-source (Qwen2.5:14b, Qwen2.5-Coder:14b, Qwen2.5-Coder:7b, Deepseek-Coder-v2:16b) and proprietary (GPT-4.1-mini, Gemini-2.0-flash) systems, across five programming languages (Python, C++, Java, C, Rust) and three prompting strategies. Findings indicate that while larger models achieve higher pass@k values (none exceeding 0.7), they struggle with harder problems and low-resource languages like Rust. Feedback-incorporation consistently improved functional correctness (+0.05 pass@k), unlike in-context learning, which had negligible impact. Models frequently produce unreliable code with fundamental errors such as missing imports, integer overflows, out-of-bounds accesses, and inefficient algorithms.

Key takeaway

For Machine Learning Engineers and AI Architects deploying LLMs for code generation, you should prioritize robust benchmarking frameworks like PROBE that assess functional correctness, solution proximity, and code quality. Do not over-rely on LLM-generated code without rigorous validation, as models frequently produce fundamental errors and struggle with complex problems. Incorporate compiler feedback mechanisms into your workflows to improve code reliability, especially for compiled languages.

Key insights

Comprehensive LLM code generation benchmarks require diverse metrics beyond unit tests to reveal critical limitations.

Principles

Method

PROBE evaluates LLM code generation using a structured framework with diverse metrics, representative workloads from IBM CodeNet, varied prompt templates, and a robust experimental procedure.

In practice

Topics

Code references

Best for: AI Engineer, Research Scientist, AI Scientist, Machine Learning Engineer, AI Architect

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by cs.SE updates on arXiv.org.