首页|期刊导航|实验技术与管理|基于大模型幻觉的计算机系统级实验教学项目设计研究

基于大模型幻觉的计算机系统级实验教学项目设计研究OA

Hallucination-driven design of system-level laboratory projects for computer science education

中文摘要英文摘要

针对LLM(large language model,大型语言模型)在高等教育实验教学中的应用挑战,该文提出一种创新的"幻觉自我测试"框架,通过触发 LLM 的幻觉现象,对内核代码实验项目进行幻觉量化,旨在提升学生自主编程能力并保障教育公平.为此,设计了一种基于幻觉机制的实验项目设计方法:通过迭代题目表述文本,对LLM 辅助工具进行幻觉量化和定位,从而相对精准地控制 LLM 的辅助编程行为,促进学生自主完成实验任务.实验在数据库系统的存储引擎、查询引擎和事务查询三大领域进行了验证,结果显示,修改后的题目使 LLM 幻觉概率显著提升,学生自主编程比例显著提高,且教育目标未受影响.该文的研究贡献包括提出幻觉驱动的题目设计原则、构建多角色协同的自我测试流程,以及实证验证了该方法在防止学术依赖和提升实践能力上的有效性,该方法为LLM时代教育公平与能力培养提供了新思路.

[Objective]The rapid development of large language models(LLMs)has brought unprecedented opportunities and challenges to higher education experimental teaching.While LLMs can provide personalized learning experiences,automated assessment,and immediate feedback,they also create substantial challenges,including students'over-reliance on AI tools,declining autonomous programming abilities,and increased academic misconduct.This study proposes an innovative hallucination self-testing framework that deliberately triggers LLM hallucinations under controlled conditions to enhance students'autonomous programming capabilities while ensuring educational fairness.The research addresses three critical challenges:designing experimental projects that can evaluate students'system coding capabilities while preventing excessive reliance on AI tools;balancing the convenience of LLM-assisted learning with academic integrity;and evaluating students'true abilities under LLM assistance.The objective is to develop a novel approach that integrates LLM hallucination characteristics into the design of database system kernel experimental projects,creating a framework that can effectively control the introduction of large model hallucinations into specified experimental projects to drive students'autonomous learning exploration.[Methods]The study focuses on database system kernel code development across three core domains:storage engines,query engines,and transaction processing.The research develops a multidimensional hallucination assessment framework with three core metrics:factual inconsistency,logical contradiction,and semantic absurdity,each quantified through independent mathematical models.The LLM hallucination self-testing framework is designed with the LLM alternately playing the role of student,question designer,and answer provider.The framework operates through iterative optimization,where initial experimental questions undergo multiple rounds of testing and refinement,with the question designer analyzing hallucination patterns from student solutions and optimizing question formulations to maximize hallucination triggers while maintaining educational value.The experimental validation involves designing specific tasks across the three core database system domains,implementing the self-testing framework,and measuring the effectiveness through compilation error rates,logical error rates,autonomous programming ratios,and knowledge coverage metrics.[Results]The experimental validation demonstrates obvious improvements in both hallucination triggering effectiveness and educational outcomes.The optimized questions successfully increased LLM hallucination probabilities across all tested domains.Storage engine experiments showed compilation error rates rising from 35%to 68%and logical error rates increasing from 40%to 72%.Query engine experiments exhibited compilation error rates that climbed from 25%to 76%,with logical error rates rising from 18%to 49%.Transaction engine experiments demonstrated compilation error rates that increased from 42%to 80%alongside the logical error rate growth from 19%to 39%.More importantly,the research achieved its primary educational objectives:students'autonomous programming ratios increased substantially from the initial 40%to over 75%across all domains,while maintaining comprehensive knowledge coverage that improved from 74%to 96%due to increased student debugging processes.The hallucination self-testing framework successfully increased hallucination trigger probabilities by 25%-40%across different database system domains:storage engine hallucination probability increased from 35%to 60%,query engine hallucination probability increased from 30%to 52%,and transaction engine hallucination probability increased from 28%to 48%.The proposed method effectively reduces student dependency on LLMs while enhancing their autonomous programming capabilities and deepening their understanding of database kernel principles.The educational value of experimental projects was not compromised;rather,it was strengthened as students gained more comprehensive practical experience through autonomous problem-solving processes.[Conclusions]The proposed hallucination self-testing framework successfully achieves the intended goal of enhancing rare attack detection capabilities and improving system detection efficiency.The method addresses the fundamental challenge of balancing AI tool utility with educational integrity by creating a controlled environment where LLM limitations can be leveraged to promote student autonomy.The theoretical contributions include the formal mathematical representation of hallucination phenomena,the development of multidimensional assessment frameworks,and the establishment of quantitative evaluation metrics for AI-generated content quality.The practical contributions encompass the design principles for hallucination-driven question formulation,the construction of multirole collaborative self-testing processes,and empirical validation of the method's effectiveness in preventing academic dependence while enhancing practical capabilities.The framework establishes a foundation for future research in LLM-human collaboration,automated hallucination quantification,and cross-domain hallucination trigger mechanisms,with potential applications extending to other computer system courses such as operating systems and compiler principles.The findings suggest that traditional evaluation systems need innovation to adapt to LLM-assisted learning paradigms.This research provides educators with a sophisticated approach to leveraging LLM hallucinations for educational benefit through carefully designed experimental questions.

于龙飞;胡柞润;滕德军;赵泓尧;彭朝晖

山东大学 计算机科学与技术学院,山东 青岛 266237山东大学 计算机科学与技术学院,山东 青岛 266237山东大学 计算机科学与技术学院,山东 青岛 266237山东大学 计算机科学与技术学院,山东 青岛 266237山东大学 计算机科学与技术学院,山东 青岛 266237

社会科学

大语言模型实验教学幻觉自主学习

large language modelexperimental teachinghallucinationself-directed learning

《实验技术与管理》 2026 (5)

217-225,9

教育部人文社会科学青年基金项目(25YJCZH090)山东大学本科教改项目(2024F22)山东省本科教学改革研究重点项目(Z2024015)山东大学实验室建设与管理研究重点项目(sy20242602)

10.16791/j.cnki.sjg.2026.05.027

评论