การพัฒนาแชทบอทบริการลูกค้าที่เข้าใจบริบทและเลือกใช้เครื่องมือโดยอัตโนมัติด้วยแบบจำลองภาษาขนาดใหญ่และ LangChain

Main Article Content

ประทีป หมื่นทิศ
สุขุมาล กิติสิน

บทคัดย่อ

ในการให้บริการลูกค้า องค์กรจำนวนมากยังเผชิญความท้าทายในการจัดการข้อมูลที่กระจัดกระจายอยู่ในระบบภายในและเอกสารหลายประเภท รวมถึงการสูญเสียองค์ความรู้เชิงปฏิบัติที่เกิดจากอัตราการหมุนเวียนของบุคลากร งานวิจัยนี้นำเสนอการออกแบบและพัฒนาระบบแชทบอทอัตโนมัติ โดยเน้นที่การประสานการทำงานระหว่างแบบจำลองภาษาขนาดใหญ่ (Large Language Model: LLM) กับเครื่องมือเสริมสองกลุ่ม ได้แก่ Retrieval-Augmented Generation (RAG) สำหรับดึงข้อมูลจากเอกสาร และ API สำหรับเชื่อมต่อกับระบบภายนอก ระบบได้รับการพัฒนาบนเฟรมเวิร์ก LangChain ซึ่งรองรับการจัดการตัวแทน (agent orchestration) และการเชื่อมโยงเครื่องมือแบบแยกส่วน (modular integration) โดยกลุ่มเครื่องมือ RAG ถูกออกแบบให้ใช้กระบวนการค้นคืนแบบผสม (Hybrid Search) พร้อมเทคนิค Reciprocal Rank Fusion เพื่อจัดอันดับความเกี่ยวข้องของข้อมูลอย่างมีประสิทธิภาพ ระบบมีความสามารถในการเลือกเครื่องมือให้เหมาะสมกับบริบทของคำถามผู้ใช้งานโดยอัตโนมัติ ผลการประเมินแสดงให้เห็นว่าระบบมีความแม่นยำในการเรียกใช้เครื่องมือ (Tool Call Accuracy) เฉลี่ย 0.88 และความถูกต้องของคำตอบ (Answer Correctness) เท่ากับ 0.80 โดยมีระดับความพึงพอใจของผู้ใช้งานและพนักงานอยู่ที่ 85.77% และ 85.04% ตามลำดับ สะท้อนถึงประสิทธิภาพของการออกแบบระบบในบริบทการให้บริการที่ต้องอาศัยข้อมูลเชิงลึกและการบูรณาการหลายระบบ

Article Details

ประเภทบทความ
บทความวิจัย

เอกสารอ้างอิง

C. C. Chang, W. S. Cheng, and S. Hsiao, "Customer Service Chatbot Enhanced with Conversational Language Understanding and Knowledge Base". IEEE 4th Eurasia Conference on IOT, Communication and Engineering (ECICE). 28-30 October. Yunlin, Taiwan : pp. 231-234, 2022. doi: 10.1109/ECICE55674.2022.10042940.

H. C. Lee, K. Hung, G. M. T. Man, R. Ho, and M. Leung, "Development of an RAG-Based LLM Chatbot for Enhancing Technical Support Service". IEEE Region 10 Conference (TENCON). 1-4 December. Singapore : pp. 1080-1083, 2024. doi: 10.1109/TENCON61640.2024.10902801

M. Guettala, S. Bourekkache, O. Kazar, and S. Harous, "Building Advanced RAG Q&A with Multiple Data Sources Using Langchain: A Multi-Search Agent RAG Application in Ubiquitous Learning". International Conference on Computing and Data Analytics (ICCDA). 12-13 November. Shinas, Oman : pp. 1-7, 2024. doi: 10.1109/ICCDA64887.2024.10867361

C. P. Ezenkwu, "Towards Expert Systems for Improved Customer Services Using ChatGPT as an Inference Engine". International Conference on Digital Applications, Transformation & Economy (ICDATE). 14-16 July, Miri, Sarawak, Malaysia : pp. 1-5, 2023. doi: 10.1109/ICDATE58146.2023.10248647

T. Zheng et al. (2 May 2025). From Automation to Autonomy: A Survey on Large Language Models in Scientific Discovery. [Online] Available : http://arxiv.org/abs/2505.13259

MongoDB Inc. (14 July 2025). How to Perform Hybrid Search. [Online] Available : https://www.mongodb.com/docs/atlas/atlas-vector-search/hybrid-search

MongoDB Inc. (14 July 2025). Perform Hybrid Search with Atlas Vector Search and Atlas Search. [Online] Available : https://www.mongodb.com/docs/atlas/atlas-vector-search/hybrid-search/vector-search-with-full-text-search

OpenAi. (10 April 2025). New Embedding Models and API Updates. [Online] Available : https://openai.com/index/new-embedding-models-and-api-updates

X. Dong, X. Zhang, W. Bu, D. Zhang, and F. Cao, "A Survey of LLM-based Agents: Theories, Technologies, Applications and Suggestions". International Conference on Artificial Intelligence, Internet of Things and Cloud Computing Technology (AIoTC). 13-15 September. Wuhan, China : pp. 407-413, 2024. doi: 10.1109/AIoTC63215.2024.10748304

LangChain. (14 July 2025). Tools. [Online] Available : https://js.langchain.com/docs/concepts/tools

S. Es, J. James, L. Espinosa-Anke, and S. Schockaert. (2 May 2025). RAGAS: Automated Evaluation of Retrieval Augmented Generation. [Online] Available : http://arxiv.org/abs/2309.15217