An Agentic Evaluation Framework for AI-Generated Scientific Code in PETSc
On the map: LLM agents and tool use → Web, search, and research agents
Abstract (arXiv)
While LLMs have accelerated scientific code generation, comprehensively evaluating generated code remains challenging. Many benchmarks emphasize functional correctness or task completion, which is insufficient for code built on production HPC libraries, where solver selection, API conventions, memory management, parallel awareness, and performance also matter. We introduce PETSCAgent-Bench, a multidimensional benchmark and agent-based framework for assessing whether AI-generated scientific code uses a production HPC library as an expert would. A tool-augmented evaluator compiles, executes, and measures code and combines deterministic checks with LLM-based assessments in a 14-evaluator pipeline spanning five categories: correctness, performance, code quality, algorithmic appropriateness, and library-specific conventions. A2A and MCP enable black-box evaluation of compatible coding agents. Across realistic PETSc problems, frontier models generate readable, well-structured code but struggle with correctness on challenging problems and with library-specific conventions even when code compiles and runs---limitations that conventional pass/fail evaluation does not capture.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 28 of its 40 references that are in the map. First posted on arXiv 16 Mar 2026.
Builds on
28 of 40 references.
Closest ancestors · 5
Same direction, newest first
- 2025AInsteinBench: Benchmarking Coding Agents on Scientific Repositories24 Dec
- 2025PDE-Agent: A toolchain-augmented multi-agent framework for PDE solving18 Dec
- 2025MOSAIC: Multi-agent Orchestration for Task-Intelligent Scientific Coding9 Oct
- 2025SciML Agents: Write the Solver, Not the Solution12 Sep
- 2024ScienceAgentBench: Toward Rigorous Assessment of Language Agents for Data-Driven Scientific Discovery7 Oct
Other references · 23
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2024SciCode: A Research Coding Benchmark Curated by Scientistscited by 172
- 2023Stop Uploading Test Data in Plain Text: Practical Strategies for Mitigating Data Contamination by Evaluation Benchmarkscited by 139
- 2025Establishing Best Practices for Building Rigorous Agentic Benchmarkscited by 94
- 2024Can Large Language Models Write Parallel Code?cited by 36
- 2023Comparing Llama-2 and GPT-3 LLMs for HPC kernels generationcited by 30
- 2024OMPGPT: A Generative Pre-trained Transformer Model for OpenMPcited by 16
- 2025MooseAgent: A LLM Based Multi-agent Framework for Automating Moose Simulationcited by 16
11 more
- 2023LLM4VV: Developing LLM-Driven Testsuite for Compiler Validationcited by 15
- 2026ProjDevBench: Benchmarking AI Coding Agents on End-to-End Project Developmentcited by 9
- 2024HPC-Coder-V2: Studying Code LLMs Across Low-Resource Parallel Languagescited by 8
- 2025LLM & HPC:Benchmarking DeepSeek's Performance in High-Performance Computing Taskscited by 8
- 2025FEM-Bench: A Structured Scientific Reasoning Benchmark for Evaluating Code-Generating LLMscited by 7
- 2025Do Large Language Models Understand Performance Optimization?cited by 6
- 2025ParEval-Repo: A Benchmark Suite for Evaluating LLMs with Repository-level HPC Translation Taskscited by 4
- 2025From Legacy Fortran to Portable Kokkos: An Autonomous Agentic AI Workflowcited by 4
- 2025Leveraging LLMs to Automate Energy-Aware Refactoring of Parallel Scientific Codescited by 3
- 2025Beyond Code Pairs: Dialogue-Based Data Generation for LLM Code Translationcited by 3
- 2025AI Assistants to Enhance and Exploit the PETSc Knowledge Basecited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025From Reproduction to Replication: Evaluating Research Agents with Progressive Code Masking
- 2026CR-Bench: Evaluating the Real-World Utility of AI Code Review Agents
- 2026SciNav: A General Agent Framework for Scientific Coding Tasks
- 2026A case study of evaluating AI agents on a neuroscience data-to-discovery pipeline
- 2026LLMoxie: Exploring Agentic AI for Scientific Software Development
- 2025AI-Generated Code Is Not Reproducible (Yet): An Empirical Study of Dependency Gaps in LLM-Based Coding Agents
- 2025Enhancing LLM Code Generation: A Systematic Evaluation of Multi-Agent Collaboration and Runtime Debugging for Improved Accuracy, Reliability, and Latency
- 2026EvoCode-Bench: Evaluating Coding Agents in Multi-Turn Iterative Interactions