การพัฒนาระบบถามตอบข้อมูลทางธุรกิจด้วยภาษาธรรมชาติบนพื้นฐานปัญญาประดิษฐ์เชิงกำเนิด

Main Article Content

นพคุณ นันทเสนีย์
สุดาสวรรค์ งามมงคลวงศ์

บทคัดย่อ

การเข้าถึงข้อมูลทางธุรกิจเพื่อการตัดสินใจอย่างรวดเร็วในปัจจุบันยังคงมีอุปสรรคสำคัญจากทักษะเฉพาะทางด้านภาษา SQL และปัญหาการสร้างข้อมูลเท็จ (Hallucination) ของแบบจำลองภาษาขนาดใหญ่เมื่อต้องทำงานกับโครงสร้างฐานข้อมูลที่ซับซ้อน งานวิจัยนี้จึงมีวัตถุประสงค์เพื่อพัฒนาระบบถามตอบข้อมูลทางธุรกิจด้วยภาษาธรรมชาติ (NL2SQL) และประเมินประสิทธิภาพเชิงเทคนิค โดยประยุกต์ใช้เทคนิคการดึงข้อมูลเสริม (Retrieval-Augmented Generation: RAG) ร่วมกับการให้บริบทโครงสร้างฐานข้อมูล (Schema Injection) ผ่านโมเดลปัญญาประดิษฐ์เชิงกำเนิด gpt-oss-120b บนหน่วยประมวลผลความเร็วสูง Groq LPU กระบวนการวิจัยดำเนินการทดสอบเชิงนำร่องผ่านชุดข้อมูลมาตรฐาน Spider 1.0 ในโดเมนห้างสรรพสินค้า จำนวน 25 คำถาม ครอบคลุมระดับความยากตั้งแต่ง่ายถึงยาก ผลการวิจัยพบว่าระบบที่พัฒนาขึ้นมีประสิทธิภาพสูงกว่าวิธีการป้อนคำถามแบบพื้นฐาน (Zero-shot Baseline) อย่างมีนัยสำคัญ โดยมีความถูกต้องของผลลัพธ์ข้อมูล (Execution Accuracy: EX) สูงถึง 96.00% ขณะที่ความถูกต้องของโครงสร้างคำสั่ง (Exact Matching: EM) อยู่ที่ 32.00% ด้านประสิทธิภาพเวลาประมวลผล ระบบมีระยะเวลาตอบสนองเฉลี่ยเพียง 0.73 วินาที ซึ่งผ่านเกณฑ์มาตรฐานปฏิสัมพันธ์ระหว่างมนุษย์และคอมพิวเตอร์ (HCI) ที่กำหนดไว้ไม่เกิน 3 วินาที ผลลัพธ์ของงานวิจัยนี้ชี้ให้เห็นว่าการบูรณาการสถาปัตยกรรมฐานข้อมูลร่วมกับเทคโนโลยีปัญญาประดิษฐ์เชิงกำเนิด สามารถแก้ปัญหาการหลอนข้อมูลและลดความหน่วงในการสื่อสารได้อย่างมีประสิทธิภาพ ช่วยให้ผู้ใช้ทั่วไปและผู้บริหารสามารถเข้าถึงข้อมูลเชิงลึกเพื่อสนับสนุนการตัดสินใจทางธุรกิจได้อย่างแม่นยำและรวดเร็วในระดับการใช้งานจริง

Article Details

รูปแบบการอ้างอิง
[1]
นันทเสนีย์ น. และ งามมงคลวงศ์ ส., “การพัฒนาระบบถามตอบข้อมูลทางธุรกิจด้วยภาษาธรรมชาติบนพื้นฐานปัญญาประดิษฐ์เชิงกำเนิด”, RMUTP Sci J, ปี 20, ฉบับที่ 1, น. 80–93, มิ.ย. 2026.
ประเภทบทความ
บทความวิจัย (Research Articles)

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

N. Rajkumar, R. Li, and D. Bahdanau, “Evaluating the text-to-SQL capabilities of large language models,” arXiv Computation and Language, arXiv:2204.00498, 2022.

F. Li and H. V. Jagadish, “Constructing an interactive natural language interface for relational databases,” in Proceedings of the VLDB Endowment, vol. 8, no. 1, pp. 73-84, 2014.

T. B. Brown et al., “Language models are few-shot learners,” arXiv Computation and Language, arXiv:2005.14165, 2020.

A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez, Ł. Kaiser, and I. Polosukhin, "Attention is all you need," Advances in Neural Information Processing Systems, vol. 30, 2017.

X. Liu et al., "A survey of NL2SQL with large language models: Where are we, and where are we going?," arXiv preprint arXiv:2408.05109, 2024.

Z. Hong, Z. Yuan, Q. Zhang, H. Chen, J. Dong, F. Huang, and H. Huang, “Next-generation database interfaces: A survey of LLM-based text-to-SQL,” IEEE Transactions on Knowledge and Data Engineering, vol. 37, no. 12, pp. 7328-7345, 2025.

T. Gladkykh and K. Kirykov, “Datrics Text2SQL: A framework for natural language to SQL query generation,” arXiv Databases, arXiv:2506.12234, 2025.

A. Chen et al., "Text-to-SQL for enterprise data analytics," arXiv preprint arXiv:2507.14372, 2025.

P. Khampirapang, “Automatic SQL Database Query Generation Using ChatGPT API,” M.S. thesis, Dept. Comput. Eng., Dhurakij Pundit Univ., Bangkok, Thailand, 2024.

T. Yu et al., “Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task,” arXiv Computation and Language, arXiv:1809.08887, 2018.

M. A. Hertzog, “Considerations in determining sample size for pilot studies,” Research in Nursing & Health, vol. 31, no. 2, pp. 180–191, 2008.

J. Li et al., “Can LLM already serve as a database interface? a big bench for large-scale database grounded text-to-sqls,” arXiv Computation and Language, arXiv:2305.03111, 2023.

V. Liu and L. B. Chilton, “Design guidelines for prompt engineering text-to-image generative models,” in Proceedings of the 2022 CHI Conference on Human Factors in Computing Systems, 2022, pp. 1–14.

P. Lewis and E. Perez, “Retrieval-augmented generation for knowledge-intensive NLP tasks,” in Proceedings of 34th Conference on Neural Information Processing Systems (NeurIPS 2020), Vancouver, Canada, 2020.

R. Zhong, T. Yu, and D. Klein, “Semantic evaluation for text-to-SQL with distilled test suites,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020, pp. 396–411.

J. Nielsen, Usability Engineering, San Francisco, CA: Morgan Kaufmann, 1994.

K. T. Pham, T. H. Nguyen, J. Jo, Q. V. H. Nguyen, and T. T. Nguyen, “Multilingual text-to-SQL: Benchmarking the limits of language models with collaborative language agents,” arXiv Computation and Language, arXiv:2509.24405, 2025.