[Paper Review] Evaluating ChatGPT and GPT-4 for Visual Programming
This study evaluates GPT-4 and ChatGPT (GPT-3.5) in visual programming tasks from Hour of Code and Karel, assessing execution trace, solution synthesis, and task synthesis. Despite GPT-4's improvements over ChatGPT, both models perform poorly in combining spatial, logical, and programming skills essential for visual programming, indicating significant limitations in current generative AI for K-8 educational contexts.
Generative AI and large language models have the potential to drastically improve the landscape of computing education by automatically generating personalized feedback and content. Recent works have studied the capabilities of these models for different programming education scenarios; however, these works considered only text-based programming, in particular, Python programming. Consequently, they leave open the question of how well these models would perform in visual programming domains popularly used for K-8 programming education. The main research question we study is: Do state-of-the-art generative models show advanced capabilities in visual programming on par with their capabilities in text-based Python programming? In our work, we evaluate two models, ChatGPT (based on GPT-3.5) and GPT-4, in visual programming domains for various scenarios and assess performance using expert-based annotations. In particular, we base our evaluation using reference tasks from the domains of Hour of Code: Maze Challenge by Code-dot-org and Karel. Our results show that these models perform poorly and struggle to combine spatial, logical, and programming skills crucial for visual programming. These results also provide exciting directions for future work on developing techniques to improve the performance of generative models in visual programming.
Motivation & Objective
- To investigate whether state-of-the-art generative AI models like GPT-4 and ChatGPT can perform as well in visual programming as they do in text-based Python programming.
- To assess the capabilities of these models in three key educational scenarios: execution trace, solution synthesis, and task synthesis within visual programming domains.
- To evaluate performance using expert-based annotations and identify gaps in multimodal reasoning required for visual programming.
- To provide a foundation for future work on improving generative models for visual programming in K-8 computing education.
Proposed method
- Evaluated two models—ChatGPT (GPT-3.5) and GPT-4—across three scenarios: execution trace, solution synthesis, and task synthesis in visual programming.
- Used ten reference tasks from two domains: Hour of Code: Maze Challenge (HoCMaze) and Karel, selected for varying complexity in code size, depth, and structure.
- Employed expert-based annotations to assess output quality using binary metrics: LayoutCorrect, TaskSolvedByCode, TaskSolvedByEdittedCode, TaskSolvable, and Overall.
- Designed prompts for each scenario with placeholders for input code and task specifications, ensuring consistency across evaluations.
- Aggregated results across 10 instances and reported performance in percentages for each metric, with human evaluators validating outputs.
- Used a relaxed solvability criterion (TaskSolvable) to account for minor code edits, reflecting realistic educational scenarios.
Experimental results
Research questions
- RQ1Do state-of-the-art generative models like GPT-4 and ChatGPT perform as well in visual programming as they do in text-based programming?
- RQ2How well can these models generate correct execution traces for visual programs?
- RQ3Can these models synthesize valid solutions for given visual programming tasks?
- RQ4Can these models generate new, solvable visual programming tasks based on a given solution code?
Key findings
- GPT-4 achieved an Overall score of 20.0% in task synthesis, compared to ChatGPT’s 10.0%, indicating measurable improvement but still poor performance.
- GPT-4 achieved 90.0% on LayoutCorrect and 80.0% on TaskSolvable, but only 0.0% on TaskSolvedByCode, showing it generates structurally correct tasks that are not solvable by the input code.
- Both models struggled significantly in combining spatial reasoning, logical structure, and programming logic, especially in complex tasks like HoCMaze:18 and Karel:Stairway.
- The models failed to generate tasks that are correctly solved by the input code, with 0.0% success rate on TaskSolvedByCode for both models.
- GPT-4 showed notable improvement over ChatGPT in LayoutCorrect (90.0% vs. 70.0%) and TaskSolvable (80.0% vs. 50.0%), but not in functional correctness.
- Illustrative examples show GPT-4 generates tasks with incorrect wall placements or goal positions that make the input code fail, even when the structure is correct.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.