Abstract
Large language models (LLMs) have demonstrated astonishing capabilities in natural language processing (NLP) tasks, sparking interest in their application to professional domains with higher specialized requirements. However, restricted access to closed-source LLMs via APIs and the difficulty in collecting massive high-quality datasets pose obstacles to the development of large language models in education fields of various courses. Given these challenges, we propose CourseGPT-zh, a course-oriented education LLM that supports customization and low-cost deployment. To address the comprehensiveness and diversity requirements of course-specific corpora, we design a high-quality question-answering corpus distillation framework incorporating prompt optimization, which effectively mines textbook knowledge and enhances its diversity. Moreover, considering the alignment of LLM responses with user needs, a novel method for discrete prompt optimization based on LLM-as-Judge is introduced. During optimization, this framework leverages the LLM's ability to reflect on and exploit error feedback and patterns, allowing for prompts that meet user needs and preferences while saving response length. Lastly, we obtain CourseGPT-zh based on the open-source LLM using parameter-efficient fine-tuning. Experimental results show that our discrete prompt optimization framework effectively improves the response quality of ChatGPT, and CourseGPT-zh exhibits strong professional capabilities in specialized knowledge question-answering, significantly outperforming comparable open-source models.
Abstract (translated)
大语言模型(LLMs)在自然语言处理(NLP)任务中表现出惊人的能力,引发了在专业领域应用这些模型以满足更高专业要求的热议。然而,通过API访问受限制的闭源LLM以及收集大量高质量数据集的困难,为教育领域各种课程开发大型语言模型设置了障碍。鉴于这些挑战,我们提出了 CourseGPT-zh,一种课程导向的教育LLM,支持定制化和低成本部署。为了满足课程特定语料库的全面性和多样性需求,我们设计了一个包括提示优化的高质量问题回答语料库,有效挖掘教科书知识并增强其多样性。此外,考虑到LLM回答与用户需求的一致性,我们引入了一种基于LLM-as-Judge的新颖的离线提示优化方法。在优化过程中,该框架利用LLM反思和利用错误反馈和模式的能力,实现满足用户需求和偏好的提示,同时节省响应长度。最后,我们通过参数高效的微调获得 CourseGPT-zh,基于开源LLM。实验结果表明,我们的离线提示优化框架有效地提高了ChatGPT的响应质量,而CourseGPT-zh在专业知识问题回答中表现出强大的专业能力,显著优于同类开源模型。
URL
https://arxiv.org/abs/2405.04781