“Keep up the good work!”: Using Constraints in Zero Shot Prompting to Generate Supportive Teacher Responses (2024)

Abstract: Educational dialogue systems have been used to support students and teachers for decades. Such systems rely on explicit pedagogically motivated dialogue rules. With the ease of integrating large language models (LLMs) into dialogue systems, applications have been arising that directly use model responses without the use of human-written rules, raising concerns about their use in classroom settings. Here, we explore how to constrain LLM outputs to generate appropriate and supportive teacher-like responses. We present results comparing the effectiveness of different constraint variations in a zero-shot prompting setting on a large mathematics classroom corpus. Generated outputs are evaluated with human annotation for Fluency, Relevance, Helpfulness, and Adherence to the provided constraints. Including all constraints in the prompt led to the highest values for Fluency and Helpfulness, and the second highest value for Relevance. The annotation results also demonstrate that the prompts that result in the highest adherence to constraints do not necessarily indicate higher perceived scores for Fluency, Relevance, or Helpfulness. In a direct comparison, all of the non-baseline LLM responses were ranked higher than the actual teacher responses in the corpus over 50% of the time.

## introduction large language models (llms) have shown great promise across many applications including recommendation systems, social chatbots, writing code, and summarizing documents @xcite . many of these applications benefit from the generative capabilities of llms such as chatgpt @xcite . however, when these models are deployed without further constraints in open-domain dialogue systems, they may generate outputs that do not adhere to the desired agent behavior @xcite . the risk of not adhering to desired teacher how do you know number two is not a straight angle? student because a straight angle goes on, on both sides. teacher it goes on forever. there's a line, and it goes on forever on both sides, absolutely. of course, it's a ray so it only goes in one direction. well before the advent of llms, educational dialogue systems have been used to provide support to students in online classes, act as 1:1 subjectspecific tutors, and provide professional training to teachers and tutors @xcite . regardless of the exact learning application, they are more beneficial to students when the systems themselves are based on the same pedagogical frameworks that a teacher would use @xcite . as such, many of these systems are built using extensive dialogue frameworks that dictate when, and how the teacher should intervene in a particular scenario. frequently, they are designed such that a teacher can modify the exact responses to apply to a given classroom age, subject, and lesson-specific goals. although this makes it possible to create highly relevant responses from the conversational agent, it also means that the agent will not generalize well to new situations. furthermore, these agents are typically designed for interaction with a single student working in an online classroom. the educational dialogue system that we present here is designed to provide support to students in a real classroom setting. consider the interaction in the dialogue system we present here provides a blueprint for how future researchers, and teachers themselves, can modify prompts to better engage with students in a classroom setting. this design is intended to echo the highly relevant and helpful nature of early rule-based education dialogue systems while allowing for more flexibility with llms to surface the response to the student. the major contributions of this work are as follows: ## results analysis the annotation analysis is divided into three sections: output quality metrics, adherence to constraints, and teacher comparison. for the first two sections, 100 samples were annotated across all six prompt variations by three annotators. the low interrater reliability (irr) scores in given the low irr values, we report the mean and standard deviation for these values to get a better sense of how the agent responses were perceived by the annotators. we see the highest agreement levels across annotators for the adherence to discourse policy. however, the adherence to dialogue act constraint did not demonstrate as high agreement. we believe this can be attributed to the fact that raters considered this to be an "acceptability" annotation -i.e. is the output aligned with an "acceptable" dialogue act for a teacher response in the given context. additionally, when annotating the outputs were compared to the actual teacher output dialogue act tags which were annotated with our classification prompt as opposed to gold standard tags. furthermore, the teacher utterances were often extremely lengthy making it difficult for both a model or a human to identify a single correct dialogue act. ## conclusion and future work the goal of these experiments was to compare the effectiveness of different constraints in the context of zero-shot prompting a language model to provide teacher-like responses to real student utterances. we evaluated the inclusion of student and teacher dialogue acts annotations as well as dialogue states in the prompts provided to mistral. a sample of 100 utterances was selected and evaluated across 6 different prompt settings by three annotators for fluency, relevance, helpfulness, and adherence to the provided constraints. the inclusion of any type of constraints showed a positive impact on all of the utterance quality metrics, but could benefit from post processing to ensure that erroneous tags are not included in the agent response to a student. we saw the highest ratings for fluency and helpfulness when student dialogue acts, teacher dialogue acts, and dialogue states were provided in the prompt. the prompt version with all the constraints also had the second highest value for relevance, suggesting that more contextual dialogue information in the prompt leads to higher quality responses from the agent. when provided a dialogue state in the input, the best performing prompt adhered to the constraint in over 95% of cases. this suggests that as future research is done identifying key pedagogical dialogue states and the ability to distinguish them from one another, llms can be very successful in adhering to the recommended states. furthermore, a subset of 30 utterances were compared to the teacher response from the ncte corpus. all of the llm prompt variations that included the conversation history were considered to be better than the actual teacher response over 50% of the time. this was largely because the annotators found the model was more likely to be directly addressing the most recent student utterance as opposed to another student, and frequently included additional supportive phrases in the response. ultimately, these findings suggest that llm-based conversational agents have a lot of potential for providing learners with additional support in the classroom, when provided the appropriate constraints. in future work, we aim to refine the set of states from the three present in the ncte dataset along with educators to cover a broader set of scenarios. additionally, we would like to explore model-based approaches for identifying the dialogue states themselves. the experiments here were limited to transcript-based annotations, in future work we intend to evaluate the responses in real scenarios with students.