InteractScience: 交互式科学演示代码生成的程序化与视觉导向评估
InteractScience: Programmatic and Visually-Grounded Evaluation of Interactive Scientific Demonstration Code Generation
AI总结:
本文提出InteractScience基准,用于评估大语言模型在生成交互式科学演示代码时结合科学知识与前端交互能力的综合表现,通过程序化测试和视觉测试相结合的方法,评估30种开源和闭源LLM的表现,揭示了在整合领域知识与交互前端编码方面的持续不足。
摘要:
大型语言模型(LLMs)正越来越能够从自然语言指令中生成完整的应用程序,为科学和教育领域创造了新的机会。在这些领域中,交互式科学演示特别有价值,可用于解释概念、支持新的教学方法和展示研究成果。生成此类演示需要模型结合准确的科学知识和能够正确实现并响应用户操作的交互前端代码。这种能力超出了现有基准的范围,这些基准通常只评估知识问答或静态网页代码生成。为了评估这种综合能力,我们设计了一个混合框架,结合程序化功能测试严格验证交互逻辑,并结合视觉导向的定性测试评估渲染输出与参考快照的一致性。基于此框架,我们提出了InteractScience基准,包含五个科学领域中精心设计的问题集,每个问题配以单元测试、参考快照和检查表。我们评估了30种领先的开源和闭源LLM,并报告了结果,突显了在整合领域知识与交互前端编码方面的持续不足。我们的工作将InteractScience定位为首个能够自动衡量这种综合能力的基准,通过现实的交互操作提供基础,推动可靠且具有教育价值的科学演示代码生成。所有代码和数据均在https://github.com/open-compass/InteractScience公开。
英文摘要:
Large Language Models (LLMs) are increasingly capable of generating complete applications from natural language instructions, creating new opportunities in science and education. In these domains, interactive scientific demonstrations are particularly valuable for explaining concepts, supporting new teaching methods, and presenting research findings. Generating such demonstrations requires models to combine accurate scientific knowledge with the ability to implement interactive front-end code that behaves correctly and responds to user actions. This capability goes beyond the scope of existing benchmarks, which typically evaluate either knowledge question answering without grounding in code or static web code generation without scientific interactivity. To evaluate this integrated ability, we design a hybrid framework that combines programmatic functional testing to rigorously verify interaction logic with visually-grounded qualitative testing to assess rendered outputs against reference snapshots. Building on this framework, we present InteractScience, a benchmark consisting of a substantial set of carefully designed questions across five scientific domains, each paired with unit tests, reference snapshots, and checklists. We evaluate 30 leading open- and closed-source LLMs and report results that highlight ongoing weaknesses in integrating domain knowledge with interactive front-end coding. Our work positions InteractScience as the first benchmark to automatically measure this combined capability with realistic interactive operations, providing a foundation for advancing reliable and educationally useful scientific demonstration code generation. All code and data are publicly available at https://github.com/open-compass/InteractScience.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。