Molly让大模型更逻辑化地解决Python编程问题
Molly: Making Large Language Model Agents Solve Python Problem More Logically
- 通过场景化交互解析用户意图,精准检索知识库
- 生成后反思机制确保回答事实准确且切题
- 专为中文Python学习者设计,适合教学辅助
将大语言模型(LLMs)作为教学助手在计算课程中受到广泛关注。现有研究主要采用微调和检索增强生成(RAG)两种方法,但微调资源消耗大且可能降低模型泛化能力,而RAG在推理过程中生成无关事实内容,易导致学习者困惑。为此,我们提出Molly智能体,专注于解决学习者在学习Python编程时遇到的问题。该智能体通过场景化交互自动解析用户提问意图,从构建的知识库中精准检索相关文档;在生成阶段,通过反思机制确保输出不仅符合事实,还能有效回应用户问题。在自建的中文Python问答数据集上进行的大量实验表明,Molly显著提升了对Python问题提供有用回答的能力。
原文摘要 · Abstract (English)
Applying large language models (LLMs) as teaching assists has attracted much attention as an integral part of intelligent education, particularly in computing courses. To reduce the gap between the LLMs and the computer programming education expert, fine-tuning and retrieval augmented generation (RAG) are the two mainstream methods in existing researches. However, fine-tuning for specific tasks is resource-intensive and may diminish the model`s generalization capabilities. RAG can perform well on reducing the illusion of LLMs, but the generation of irrelevant factual content during reasoning can cause significant confusion for learners. To address these problems, we introduce the Molly agent, focusing on solving the proposed problem encountered by learners when learning Python programming language. Our agent automatically parse the learners' questioning intent through a scenario-based interaction, enabling precise retrieval of relevant documents from the constructed knowledge base. At generation stage, the agent reflect on the generated responses to ensure that they not only align with factual content but also effectively answer the user's queries. Extensive experimentation on a constructed Chinese Python QA dataset shows the effectiveness of the Molly agent, indicating an enhancement in its performance for providing useful responses to Python questions.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。