In this project, computing students learn to integrate large language models (LLMs) into a software system. Students develop a Java application with a basic graphical user interface (GUI) using JavaFX, gain practical experience with prompt engineering, and learn about the impact of LLM parameters and conversational roles. Students are provided with a Java-based API that connects with OpenAI’s GPT model. The project emphasizes teaching students to manage LLM API calls, enhance GUI responsiveness, and improve the user ex\perience all in the context of an AI-powered application. This experience equips them with critical skills in software development and AI application. It prepares them for advanced software development by learning how to create effective LLM prompts to create intelligent and user-friendly applications. We share the experience of using this project and provide guidelines for assessing it in a second-year software engineering undergraduate course, where students’ prior programming experience is limited to the prerequisite CS2 course on object-oriented programming. In the case study we present, the project involved developing a riddle-solving escape room, which we called EscAIpe Room.
We provide specific recommendations and advice for instructors who may want to adapt this project for their own course.
Prerequisite Knowledge: We recommend that students have a basic understanding of Java programming, including object-oriented concepts (in particular, classes, inheritance, polymorphism, and basic data structures).
Time Management: Depending on the course level and the desired complexity of the project, instructors should allocate between 5–10 weeks for this project. This would allow students to become familiar with JavaFX and concurrency in JavaFX (1–2 weeks), explore the starter code and LLM interactions (1–2 weeks), and then implement extensions for the application (3–6 weeks) as defined by the instructor.
GUI Development: We strongly recommend that students use JavaFX Scene Builder for the development of the GUI. Scene Builder provides a simple drag-and-drop interface that simplifies the design without requiring manual coding of the GUI components. Instructors should guide students to initially focus on core functionality, such as adding a hint system and count-down timer, rather than initially investing too much time in the visual aspects. This ensures that essential features are operating, and provides a solid foundation for the project.
Prompt Engineering: We recommend that instructors include a lecture on prompt engineering techniques.
Ethical Considerations: While integrating OpenAI’s GPT into the project provides valuable learning, we also acknowledge potential concerns: Privacy Concerns, Cost Barriers and Fair Access, Content Appropriateness, and Compliance with OpenAI’s Usage Policies.
Use of AI Tools in Development: Whether students use tools like GitHub Copilot or ChatGPT to generate code for their application is a course-specific decision left to the instructor. In our experience, we allowed and even encouraged students to utilize these tools during development. The primary objective of this assignment is for students to learn how to incorporate LLMs into the software they develop, which is independent of whether they use generative AI to assist in writing code.
Team Collaboration Tools: If instructors wish to assign this project as a group project, we recommend providing guidance on collaboration tools.
Pitfalls and Struggles: The main challenge for students was learning JavaFX. Another challenge was prompt engineering; students struggled to craft the right prompts to achieve the intended behavior from the LLMs.
Lessons Learned: Balancing Autonomy with Guidance; Supporting Hands-On Learning; Incremental Milestones; and Understanding Client Requirements.
The project aligns with the NCWIT Engagement Practices Framework through the following teaching practices:
Using Meaningful and Relevant Content: The project engages students by integrating the latest AI technologies, such as OpenAI’s GPT model. By working on a riddle-solving escape room, students discover the potential of LLMs and how to best integrate them to create interactive conversational applications. This real-world practical experience motivates students to learn about AI, and help them better understand the capabilities and limitations of LLMs. The conversational nature of the application also raises the importance of students considering the user experience in software design, which is a key aspect of human-computer interaction.
Incorporating Student Choice: By only providing students with simple starter code, the project requires them to be creative and extend the application in a number of ways. Students need to propose their own theme for the escape room, then design additional rooms and their own riddles. This autonomy encourages students to pursue a direction most interesting and meaningful to them, allowing them to take ownership of their learning. Instructors should still impose constraints to guide students in scope, depending on course level and time limitations. For example, must have three rooms, and riddles should be solvable within two minutes.
Make Interdisciplinary Connections to CS: The open-ended nature of the project allows making connections with various fields. Within computing, cross-disciplinary fields could include computational linguistics and human-computer interaction. Outside computing, cross-disciplinary fields could include cognitive science, where students explore how humans solve problems, or psychology, which provides insight into how humans behave in escape rooms.