Home
Scholarly Works
Can Small Language Models With Retrieval-Augmented...
Conference

Can Small Language Models With Retrieval-Augmented Generation Replace Large Language Models When Learning Computer Science?

Abstract

Leveraging Large Language Models (LLMs) for personalized learning and support is becoming a promising tool in computing education. AI Assistants can help students with programming, problem-solving, converse with them to clarify course content, explain error messages to help with debugging, and much more. However, using cloud-based LLMs poses risks around data security, privacy, but also control of the overarching system. To address these concerns, we created a locally-stored Small Language Model (SLM) that leverages different Retrieval-Augmented Generation (RAG) methods to support computing students' learning. We compare one SLM (neural-chat-7b-v3 - fine-tuned version of Mistral-7B-v0.1) against two popular LLMs (gpt-3.5-turbo and gpt-4-32k) to see the viability for computing educators to use in their course(s). We use conversations from a CS1 course (N = 1,260), providing students with an AI Assistant (using gpt-3.5-turbo) to help them learn content and support problem-solving while completing their Python programming assignment. In total, we had 269 students use the AI Assistant, with a total of 1,988 questions asked. Using this real conversational data, we re-ran student questions using our novel SLM (neural-chat-7b-v3 testing nine different RAG methods) and gpt-4-32k, then compared those results against the original gpt-3.5-turbo responses. Our findings indicate that using an SLM with RAG can perform similarly, if not better, than LLMs. This shows that it is possible for computing educators to use SLMs (with RAG) in their course(s) as a tool for scalable learning, supporting content understanding and problem-solving needs, while employing their own policies on data privacy and security.

Authors

Liu S; Yu Z; Huang F; Bulbulia Y; Bergen A; Liut M

Pagination

pp. 388-393

Publisher

Association for Computing Machinery (ACM)

Publication Date

July 3, 2024

DOI

10.1145/3649217.3653554

Name of conference

Proceedings of the 2024 on Innovation and Technology in Computer Science Education V. 1

Labels

Sustainable Development Goals (SDG)

View published work (Non-McMaster Users)
Can Small Language Models With Retrieval-Augmented...