Design and Implementation of Knowledge Question Answering System for Python Based on LangChain
(College of Computer Science and Technology, Taiyuan Normal University, Taiyuan 030619, China)
Abstract
The development and application of large models become a mainstream trend. As the core programming language for the development and application of large models, the importance of Python continues to increase. To help undergraduate students learn and master this programming language efficiently, this paper designs and implements an intelligent Question Answering agent system to assist students in learning. This system takes LangChain framework as the core, integrates the locally deployed DeepSeek large model, and combines the local knowledge vector database constructed by Chroma to complete the analysis and intelligent response to student questions. Meanwhile, Vue3 and FastAPI frameworks are adopted to develop Web applications, providing a simple and easy-to-use interactive page for students. The proposed implementation scheme has positive practical significance for the application of agent technology in undergraduate teaching of colleges and universities.
Keywords
LangChain; agent; vector database; retrieval-augmented generation; Large Language Model
References
- [1] Su Xiaohong, He Qinming Exploration of Artificial Intelligence Empowering Teaching and Learning Scenarios and Mode Innovation: Taking Programming Courses as an Example [J]. Chinese University Teaching, 2025 (6): 65-72
- [2] Huazi Xun, Wang Wei, Liao Luyou, etc Generative Artificial Intelligence RAG Path Empowerment Course Design: Construction of Course Small Language Model and Teaching Practice [J]. Journal of Guangdong Second Normal University, 2025, 45 (5): 31-44
- [3] Cai Zhenhua, Wang Yanzhen, Yang Jing Research and Implementation of University Financial Q&A System Based on LangChain and ChatGLM [J]. Modern Computer, 2024, 30 (15): 104-110
- [4] Yang Bin, Xiao Hongru, Gao Shang, etc Question and Answer System for Building Construction Language Model Based on Collaborative Expert System [J]. Journal of Tongji University (Natural Science Edition), 2026, 54 (1): 13-21, 30
- [5] Ding Ning, Song Yuxin, Dan Zetian, etc Exploration of the Construction of an Intelligent Question Answering System for Medical Teaching Assistance Based on Retrieval Enhanced Generation (RAG) Technology [J]. China Medical Education Technology, 2025, 39 (1): 1-5
- [6] Lu Xiuchang, Lin Na, Luo Yonghan, etc Multi level collaborative visualization front-end design supported by Vue [J]. Electronic Design Engineering, 2025, 33 (19): 127-131
- [7] Chen Dihuan, Lu Xi, Zhang Yaofeng Research on Question Answering System in Bidding Field Based on LangChain+LLM [J]. Big Data Era, 2024 (5): 23-28
- [8] Hu Yuanjiang, Li Yanhe Research on the prompt word template architecture and language parameter setting of the big language model: taking the readability of generative news discourse as an example [J]. Foreign Language Journal, 2025 (5): 25-31
- [9] Zou Cong, Zhang Haoyang, Zhou Hao Design and Implementation of Data Application Management System Based on Vue3 [J]. Modern Computer, 2024, 30 (23): 211-214
- [10] Du Haotian, Li Yifan, Huo Ying, etc Application of Improved YOLOv5s in Surface Defect Detection of Steel [J]. Industrial Control Computer, 2025, 38 (12): 53-54, 57
About the authors
Zhang Ning (1975.10-), male, Han ethnicity, from Dalian, Liaoning, lecturer, master's student, research direction: computer applications.