InteractScience: Programmatic and Visually-Grounded Evaluation of Interactive Scientific Demonstration Code Generation
Abstract
While Large Language Models (LLMs) hold promise for automating science and education, generating interactive scientific demonstrations demands a complex synthesis of deep domain knowledge and precise reactive coding. Current benchmarks fail to capture this synergy, largely bifurcating into static code generation or text-only reasoning. To address this, we introduce \textsc{InteractScience}, the first benchmark dedicated to evaluating the holistic creation of interactive scientific applications. We propose a novel hybrid framework that integrates programmatic functional testing for logic verification with visually-grounded qualitative assessment for rendering fidelity. Our evaluation of 30 leading models across five disciplines reveals critical gaps in grounding scientific reasoning within interactive interfaces. By standardizing this combined capability, \textsc{InteractScience} establishes a crucial foundation for reliable AI-driven tools in science and education.
Lay Summary
While AI has become excellent at answering science questions, it often struggles to build interactive tools like physics simulations. Current evaluation methods fall short because they only check static code, missing whether the interactive features actually obey scientific laws. To address this, we developed InteractScience, a new framework to test AI-generated scientific applications. Our system acts like a rigorous inspector, automatically simulating user actions to verify the internal logic while checking if the visual animations are scientifically accurate. After testing 30 leading models, we discovered that many AI tools create beautiful interfaces that secretly hide incorrect scientific facts. InteractScience provides a vital auditing tool to ensure that AI applications are safe and reliable for science and education.