GPT-4.1 Sets the Standard in Automated Experiment Design Using Novel Python Libraries
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have advanced rapidly as tools for automating code generation in scientific research, yet their ability to interpret and use unfamiliar Python APIs for complex computational experiments remains poorly characterized. This study systematically benchmarks a selection of state-of-the-art LLMs in generating functional Python code for two increasingly challenging scenarios: conversational data analysis with the textitParShift library, and synthetic data generation and clustering using textitpyclugen and textitscikit-learn. Both experiments use structured, zero-shot prompts specifying detailed requirements but omitting in-context examples. Model outputs are evaluated quantitatively for functional correctness and prompt compliance over multiple runs, and qualitatively by analyzing the errors produced when code execution fails. Results show that only a small subset of models consistently generate correct, executable code. GPT-4.1 achieved a 100% success rate across all runs in both experimental tasks, whereas most other models succeeded in fewer than half of the runs, with only Grok-3 and Mistral-Large approaching comparable performance. In addition to benchmarking LLM performance, this approach helps identify shortcomings in third-party libraries, such as unclear documentation or obscure implementation bugs. Overall, these findings highlight current limitations of LLMs for end-to-end scientific automation and emphasize the need for careful prompt design, comprehensive library documentation, and continued advances in language model capabilities.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). Builds on 34 of its 68 references that are in the map. First posted on arXiv 30 Jul 2025.
Builds on
34 of 68 references.
References · 34
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2025Qwen3 Technical Reportcited by 8,820
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2024GPT-4o System Cardcited by 4,588
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2025Gemma 3 Technical Reportcited by 1,824
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,210
- 2024Qwen2.5-Coder Technical Reportcited by 1,203
22 more
- 2024Phi-4 Technical Reportcited by 711
- 20242 OLMo 2 Furiouscited by 340
- 2024DeepSeek-Coder-V2: Breaking the Barrier of Closed-Source Models in Code Intelligencecited by 331
- 2023ChatGPT for Robotics: Design Principles and Model Abilitiescited by 299
- 2023Auto-GPT for Online Decision Making: Benchmarks and Additional Opinionscited by 255
- 2024Data Interpreter: An LLM Agent For Data Sciencecited by 225
- 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 170
- 2024CodeGemma: Open Code Models Based on Gemmacited by 150
- 2021Jigsaw: Large Language Models meet Program Synthesiscited by 103
- 2024AgentReview: Exploring Peer Review Dynamics with LLM Agentscited by 93
- 2025LLM4SR: A Survey on Large Language Models for Scientific Researchcited by 83
- 2024LitLLM: A Toolkit for Scientific Literature Reviewcited by 63
- 2024Calibration and Correctness of Language Models for Codecited by 49
- 2024Prompt Design and Engineering: Introduction and Advanced Methodscited by 45
- 2023On the Effectiveness of Large Language Models in Domain-Specific Code Generationcited by 44
- 2023BioPlanner: Automatic Evaluation of LLMs on Protocol Planning in Biologycited by 43
- 2024Reproducibility in Machine Learning-based Research: Overview, Barriers and Driverscited by 34
- 2025PiFlow: Principle-Aware Scientific Discovery with Multi-Agent Collaborationcited by 28
- 2024Improving Scientific Hypothesis Generation with Knowledge Grounded Large Language Modelscited by 22
- 2025Assessing the Macro and Micro Effects of Random Seeds on Fine-Tuning Large Language Modelscited by 10
- 2025DeepSeek-V3, GPT-4, Phi-4, and LLaMA-3.3 generate correct code for LoRaWAN-related engineering taskscited by 4
- 2023Generating Multidimensional Clusters With Support Linescited by 1
Built on by
Citing papers per year: 2025: 4; 2026: 4.
8 papers.
- 2025When Visualizing is the First Step to Reasoning: MIRA, a Benchmark for Visual Chain-of-Thoughtcited by 21
- 2025VisCoder2: Building Multi-Language Visualization Coding Agentscited by 6
- 2026Trust Me, Import This: Dependency Steering Attacks via Malicious Agent Skillscited by 5
- 2025ReTabAD: A Benchmark for Restoring Semantic Context in Tabular Anomaly Detectioncited by 3
- 2026From GPT-3 to GPT-5: Mapping their capabilities, scope, limitations, and consequencescited by 3
- 2026Can Large Language Models Implement Agent-Based Models? An ODD-based Replication Studycited by 1
- 2026Chart-FR1: Visual Focus-Driven Fine-Grained Reasoning on Dense Chartscited by 1
- 2025In2x at WMT25 Translation Taskcited by 0
- 2026Trust Me, Import This: Dependency Steering Attacks via Malicious Agent Skills10 May 2026
- 2026Chart-FR1: Visual Focus-Driven Fine-Grained Reasoning on Dense Charts3 May 2026
- 2026From GPT-3 to GPT-5: Mapping their capabilities, scope, limitations, and consequences11 Apr 2026
- 2026Can Large Language Models Implement Agent-Based Models? An ODD-based Replication Study8 Feb 2026
- 2025When Visualizing is the First Step to Reasoning: MIRA, a Benchmark for Visual Chain-of-Thought4 Nov 2025
- 2025VisCoder2: Building Multi-Language Visualization Coding Agents24 Oct 2025
- 2025ReTabAD: A Benchmark for Restoring Semantic Context in Tabular Anomaly Detection2 Oct 2025
- 2025In2x at WMT25 Translation Task20 Aug 2025