{"id":88171,"date":"2024-09-18T15:46:17","date_gmt":"2024-09-18T14:46:17","guid":{"rendered":"https:\/\/www.raspberrypi.org\/?p=88171"},"modified":"2024-09-19T09:39:08","modified_gmt":"2024-09-19T08:39:08","slug":"error-message-explanations-large-language-models-teachers-views","status":"publish","type":"post","link":"https:\/\/www.raspberrypi.org\/blog\/error-message-explanations-large-language-models-teachers-views\/","title":{"rendered":"How useful do teachers find error message explanations generated by AI? Pilot research results"},"content":{"rendered":"\n

As discussions of how artificial intelligence (AI) will impact teaching, learning, and assessment proliferate, I was thrilled to be able to add one of my own research projects to the mix. As a research scientist at the Raspberry Pi Foundation, I\u2019ve been working on a pilot research study in collaboration with Jane Waite to explore the topic of program error messages (PEMs). <\/p>\n\n\n

\n
\"Computer<\/figure>\n<\/div>\n\n\n

PEMs can be a significant barrier to learning for novice coders, as they are often confusing and difficult to understand. This can hinder troubleshooting and progress in coding, and lead to frustration. <\/p>\n\n\n\n

Recently, various teams have been exploring how generative AI, specifically large language models (LLMs), can be used to help learners understand PEMs. My research in this area specifically explores secondary teachers\u2019 views of the explanations of PEMs generated by a LLM, as an aid for learning and teaching programming, and I presented some of my results in our ongoing seminar series<\/a>.<\/p>\n\n\n\n

Understanding program error messages is hard at the start<\/h2>\n\n\n\n

I started the seminar by setting the scene and describing the current background of research on novices\u2019 difficulty in using PEMs to fix their code, and the efforts made to date to improve these. The three main points I made were that:<\/p>\n\n\n\n

    \n
  1. PEMs are often difficult to decipher, especially by novices, and there\u2019s a whole research area dedicated to identifying ways to improve them.<\/li>\n\n\n\n
  2. Recent studies<\/a> have employed LLMs as a way of enhancing PEMs. However, the evidence<\/a> on what makes an \u2018effective\u2019 PEM for learning is limited, variable, and contradictory.<\/li>\n\n\n\n
  3. There is limited research in the context of K\u201312 programming education, as well as research conducted in collaboration with teachers to better understand the practical and pedagogical implications of integrating LLMs into the classroom more generally.<\/li>\n<\/ol>\n\n\n\n

    My pilot study aims to fill this gap directly, by reporting K\u201312 teachers\u2019 views of the potential use of LLM-generated explanations of PEMs in the classroom, and how their views fit into the wider theoretical paradigm of feedback literacy. <\/p>\n\n\n\n

    What did the teachers say?<\/h2>\n\n\n\n

    To conduct the study, I interviewed eight expert secondary computing educators. The interviews were semi-structured activity-based interviews, where the educators got to experiment with a prototype version of the Foundation\u2019s publicly available Code Editor<\/a>. This version of the Code Editor was adapted to generate LLM explanations when the question mark next to the standard error message is clicked (see Figure 1 for an example of a LLM-generated explanation). The Code Editor version called the OpenAI GPT-3.5 interface to generate explanations based on the following prompt: \u201cYou are a teacher talking to a 12-year-old child. Explain the error {error} in the following Python code: {code}\u201d. <\/p>\n\n\n

    \n
    \"The
    Figure 1: The Foundation’s Code Editor with LLM feedback prototype.<\/figcaption><\/figure>\n<\/div>\n\n\n

    Fifteen themes were derived from the educators\u2019 responses and these were split into five groups (Figure 2). Overall, the educators\u2019 views of the LLM feedback were that, for the most part, a sensible explanation of the error messages was produced. However, all educators experienced at least one example of invalid content (LLM “hallucination”). Also, despite not being explicitly requested in the LLM prompt, a possible code solution was always included in the explanation.<\/p>\n\n\n

    \n
    \"Themes
    Figure 2: Themes and groups derived from teachers\u2019 responses.
    <\/figcaption><\/figure>\n<\/div>\n\n\n

    Matching the themes to PEM guidelines<\/h2>\n\n\n\n

    Next, I investigated how the teachers\u2019 views correlated to the research conducted to date on enhanced PEMs. I used the guidelines proposed by Brett Becker and colleagues<\/a>, which consolidate a lot of the research done in this area into ten design guidelines. The guidelines offer best practices on how to enhance PEMs based on cognitive science and educational theory empirical research. For example, they outline that enhanced PEMs should provide scaffolding for the user, increase readability, reduce cognitive load, use a positive tone, and provide context to the error.<\/p>\n\n\n\n

    Out of the 15 themes identified in my study, 10 of these correlated closely to the guidelines. However, the 10 themes that correlated well were, for the most part, the themes related to the content of the explanations, presentation, and validity (Figure 3). On the other hand, the themes concerning the teaching and learning process did not fit as well to the guidelines.<\/p>\n\n\n

    \n
    \"Correlation
    Figure 3: Correlation between teachers\u2019 responses and enhanced PEM design guidelines.
    <\/figcaption><\/figure>\n<\/div>\n\n\n

    Does feedback literacy theory fit better?<\/h2>\n\n\n\n

    However, when I looked at feedback literacy theory, I was able to correlate all fifteen themes \u2014 the theory fits.<\/p>\n\n\n\n

    Feedback literacy theory positions the feedback process (which includes explanations) as a social interaction, and accounts for the actors involved in the interaction \u2014 the student and the teacher \u2014 as well as the relationships between the student, the teacher, and the feedback. We can explain feedback literacy theory using three constructs: feedback types, student feedback literacy, and teacher feedback literacy (Figure 4). <\/p>\n\n\n

    \n
    \"Feedback
    Figure 4: Feedback literacy at the intersection between feedback types, student feedback literacy, and teacher feedback literacy.<\/figcaption><\/figure>\n<\/div>\n\n\n

    From the feedback literacy perspective, feedback can be grouped into four types: telling, guiding, developing understanding, and opening up new perspectives. The feedback type depends on the role of the student and teacher when engaging with the feedback (Figure 5). <\/p>\n\n\n

    \n
    \"Feedback
    Figure 5: Feedback types as formalised by McLean, Bond, & Nicholson<\/a>.<\/figcaption><\/figure>\n<\/div>\n\n\n

    From the student perspective, the competencies and dispositions students need in order to use feedback effectively can be stated as: appreciating the feedback processes, making judgements, taking action, and managing affect. Finally, from a teacher perspective, teachers apply their feedback literacy skills across three dimensions: design, relational, and pragmatic. <\/p>\n\n\n\n

    In short, according to feedback literacy theory, effective feedback processes entail well-designed feedback with a clear pedagogical purpose, as well as the competencies students and teachers need in order to make sense of the feedback and use it effectively.<\/p>\n\n\n

    \n
    \"A<\/figure>\n<\/div>\n\n\n

    This theory therefore provided a promising lens for analysing the educators’ perspectives in my study. When the educators\u2019 views were correlated to feedback literacy theory, I found that:<\/p>\n\n\n\n

      \n
    1. Educators prefer the LLM explanations to fulfil a guiding<\/strong> and developing understanding<\/strong> role, rather than telling<\/strong>. For example, educators prefer to either remove or delay the code solution from the explanation, and they like the explanations to include keywords based on concepts they are teaching in the classroom to guide and develop students\u2019 understanding rather than tell.<\/li>\n<\/ol>\n\n\n\n
        \n
      1. Related to students\u2019 feedback literacy, educators talked about the ways in which the LLM explanations help or hinder students to make judgements<\/strong> and action the feedback<\/strong> in the explanations. For example, they talked about how detailed, jargon-free explanations can help students make judgments about the feedback, but invalid explanations can hinder this process. Therefore, teachers talked about the need for ways to manage such invalid instances. However, for the most part, the educators didn\u2019t talk about eradicating them altogether. They talked about ways of flagging them, using them as counter-examples, and having visibility of them to be able to address them with students.<\/li>\n<\/ol>\n\n\n\n
          \n
        1. Finally, from a teacher feedback literacy perspective, educators discussed the need for professional development to manage feedback processes inclusive of LLM feedback (design<\/strong>) and address issues resulting from reduced opportunities to interact with students (relational <\/strong>and pragmatic<\/strong>). For example, if using LLM explanations results in a reduction in the time teachers spend helping students debug syntax errors from a pragmatic time-saving perspective, then what does that mean for the relationship they have with their students? <\/li>\n<\/ol>\n\n\n\n

          Conclusion from the study<\/h2>\n\n\n\n

          By correlating educators\u2019 views to feedback literacy theory as well as enhanced PEM guidelines, we can take a broader perspective on how LLMs might not only shape the content of the explanations, but the whole social interaction around giving and receiving feedback. Investigating ways of supporting students and teachers to practise their feedback literacy skills matters just as much, if not more, than focusing on the content of PEM explanations. <\/p>\n\n\n\n

          This study was a first-step exploration of eight educators\u2019 views on the potential impact of using LLM explanations of PEMs in the classroom. Exactly what the findings of this study mean for classroom practice remains to be investigated, and we also need to examine students\u2019 views on the feedback and its impact on their journey of learning to program. <\/p>\n\n\n\n

          If you want to hear more, you can watch my seminar:<\/p>\n\n\n\n

          \n