In computer science, students are encouraged to learn various programming languages such as Python, C++, and Java, equipping them with a broad range of technical skills and problem-solving capabilities. Nevertheless, the design of objective examination questions to assess students' creativity, problem-solving abilities, and domain knowledge remains a significant challenge. This paper proposes a methodology to address these challenges by leveraging prompt engineering techniques with ChatGPT. Prompt engineering is an efficient technique that optimizes the performance of language models, enabling the automatic generation of high-quality exam questions with varying types and difficulty levels, all without requiring additional fine-tuning of the model. This study applies diverse patterns and templates to generate exam questions that incorporate both theoretical and practical components, thereby facilitating a comprehensive evaluation of students' theoretical understanding and hands-on programming proficiency. A survey was conducted to validate the proposed method, and although certain areas indicated room for improvement, the overall results confirmed its significance and relevance. The generated questions and model answers exhibit quality comparable to, or even surpassing, manually crafted questions while significantly reducing the time and effort required for question preparation. This research demonstrates that automated exam question generation through prompt engineering enhances the quality and efficiency of assessment tools in education, establishing it as a valuable asset for future educational environments.
翻译:在计算机科学领域,我们鼓励学生学习Python、C++和Java等多种编程语言,以培养广泛的技术技能和问题解决能力。然而,设计能够评估学生创造力、问题解决能力及领域知识的客观考试题目仍是一项重大挑战。本文提出一种方法,通过结合提示工程技术利用ChatGPT来应对这些挑战。提示工程是一种优化语言模型性能的高效技术,能够自动生成类型多样、难度各异的高质量考试题目,且无需对模型进行额外的微调。本研究应用多种模式和模板来生成包含理论与实操组件的考试题目,从而促进对学生理论理解和动手编程能力的全面评估。我们通过一项调查验证了所提方法,尽管某些方面显示仍有改进空间,但整体结果证实了该方法的重要性和适用性。生成的题目及参考答案在质量上可与人工编写的题目相媲美甚至更优,同时显著减少了出题所需的时间和精力。本研究表明,通过提示工程实现自动化考试题目生成,能够提升教育评估工具的质量与效率,使其成为未来教育环境中的宝贵资源。