ENHANCING R-CODING AND PROBLEM-SOLVING SKILLS FOR ADULT LEARNERS WITH CHATGPT PROMPTS AND INTERACTIVE LEARNING
C.A. Hargreaves, A. Pal
Advancements in generative AI, such as ChatGPT, are transforming learning and code generation through prompt engineering where precise prompts are crafted to produce R code. The effectiveness of ChatGPT depends significantly on prompt quality. Traditional methods for teaching R programming, especially to administrative and executive staff, present a steep learning curve, relying heavily on R syntax familiarisation. There is still a lack of focus on effective methods for teaching beginners and retraining adults in future-ready skills like R programming for real-world problem-solving.
This study proposes an interactive learning approach in which learners use real-world data to perform customer clustering, leveraging ChatGPT to generate R code through guided prompts. By incorporating generative AI into the learning process, this approach simplifies R programming, making coding more understandable for beginners. With the exponential growth of data, programming knowledge has become essential for organizations to analyse and derive insights from big data, ensuring competitiveness and sustainability. To address this need, the National University of Singapore (NUS) launched the Data Literacy Programme (DLP) in April 2020 to enhance the data skills of administrative and executive staff. The programme comprises nine courses, eight of which include R programming, where participants learn to tackle workplace challenges by writing and debugging R code to develop practical solutions.
Generative AI tools like ChatGPT are advancing rapidly, creating new opportunities to simplify coding, and boost productivity. This study focused on teaching adult learners R programming from scratch using ChatGPT-powered prompt engineering. To facilitate learning, a data analytics framework and a prompt engineering guide were developed for beginners performing cluster analysis. Findings reveal that interactive learning with ChatGPT significantly improves learners’ understanding of R programming, as the AI provides real-time code explanations and guidance. These explanations empower learners to confidently apply their knowledge to other scenarios. Combining computational thinking, problem-solving, and generative AI creates a more engaging and impactful experience for adult learners.
In a shorter timeframe, learners with no prior experience in R coding or prompt engineering successfully developed code for clustering customers. Compared to traditional teaching methods, this approach significantly reduced the time needed to achieve these learning outcomes. Feedback indicated that learners felt more confident and empowered to use ChatGPT prompts, enabling them to effectively apply R coding to develop data-driven solutions to workplace challenges.
This study introduced an innovative and interactive approach for teaching R programming, highlighting the transformative potential of generative AI in education. By leveraging ChatGPT, learners were able to understand complex concepts and apply data science frameworks through hands-on, engaging activities. The findings indicate that prompt engineering is an effective strategy for making coding more understandable, even for individuals with no prior background and experience in coding. This AI-assisted method not only simplifies the learning process but also empowers professionals with practical skills to solve clustering problems effectively in the workplace. Its potential limitations are also discussed in the paper.
Keywords: Generative AI, R Programming, Adult Learning, Interactive Teaching, Data Science Education, Prompt Engineering, ChatGPT.