NL2Scratch: An Executable Benchmark and Evaluation for Block-Based Programming
Not on the map. Why?
Abstract (arXiv)
Block-based programming environments such as Scratch are widely used in early programming education, yet natural-language-to-code (NL2Code) research has focused primarily on text-based languages. Scratch programs are event-driven, visually compositional, and distributed across concurrent scripts, making conventional NL2Code assumptions and evaluation insufficient. We introduce NL2Scratch, an executable benchmark for natural-language-to-Scratch generation comprising 311,648 parser-valid NL--program pairs, whose program side is extracted from real Scratch projects and paired with semantically aligned NL descriptions. For reliable evaluation beyond surface overlap, we propose Semantic Alignment Consistency (SAC), an interpretable slot-level metric for measuring semantic agreement between descriptions and programs. With SAC, we construct a semantically validated pool of 23,594 examples, and a slot-balanced 800 diagnostic benchmark. Experiments across instruction-tuned and fine-tuned LLMs reveal a notable gap between lexical similarity and semantic alignment: models achieving token-level F1 above 0.93 often fail to attain perfect SAC, particularly on longer examples. Errors concentrate on operational slots like actions, conditions, and numeric arguments, exposing failure modes largely invisible under conventional metrics.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 15 of its 33 references that are in the map. First posted on arXiv 20 Jun 2026.
Builds on
15 of 33 references.
References · 15
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2021Measuring Coding Challenge Competence With APPScited by 902
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2023Studying the effect of AI Code Generators on Supporting Novice Learners in Introductory Programmingcited by 89
- 2024Automated Data Visualization from Natural Language via Large Language Models: An Exploratory Studycited by 27
- 2024ChatScratch: An AI-Augmented System Toward Autonomous Visual Programming Learning for Children Aged 6-12cited by 7
- 2021LitterBox: A Linter for Scratch Programscited by 3
- 2025Scratch Copilot: Supporting Youth Creative Coding with AIcited by 3
- 2025ViScratch: Using Large Language Models and Gameplay Videos for Automated Feedback in Scratchcited by 2
- 2025LitterBox+: An Extensible Framework for LLM-enhanced Scratch Static Code Analysiscited by 2
Built on by
Not cited yet.