簡易檢索 / 詳目顯示

研究生: 陳思蓉
Chen, Sih-Rong
論文名稱: 基於 RAG 技術的企業標準作業程序問答系統研究:文本切割與檢索機制的優化探討
A Study on Enterprise SOP Question-Answering System Based on RAG Technology: Optimization of Text Splitting and Retrieval Mechanisms
指導教授: 劉任修
Liu, Ren-Shiou
學位類別: 碩士
Master
系所名稱: 管理學院 - 工業與資訊管理學系
Department of Industrial and Information Management
論文出版年: 2025
畢業學年度: 113
語文別: 中文
論文頁數: 137
中文關鍵詞: 文本切割檢索機制標準作業程序LangChainDoWhyRAG
外文關鍵詞: RAG, LangChain, DoWhy, Text Segmentation, Retrieval Mechanism, Standard Operating Procedures
相關次數: 點閱:72下載:30
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 隨著企業運營中標準作業程序文檔的複雜性不斷增加,如何快速且準確地從龐大的文檔中提取相關資訊,已成為一項重要挑戰。本研究聚焦於檢索增強生成技術在企業 SOP 問答系統中的應用,並圍繞兩個核心問題展開探討:第一,文本切割方式如何影響 RAG 系統的生成質量與準確性;第二,如何克服傳統基於單一餘弦相似度的 RAG 檢索方法在企業 SOP 場景中的局限性。本研究基於 LangChain 框架設計實作了一個 RAG 系統,在研究設計上,首先針對文本切割策略進行實驗,分析不同切割策略對生成質量與準確性的影響。其次,鑑於現有相關文獻所提方法在企業環境中的應用面臨一定局限性,其大部分方法基於文本資料可以完整上傳至大型語言模型進行訓練,但在企業內部 SOP 的情境中,文檔通常屬於機密文件,無法輕易上傳且企業內部的專業用語或特殊流程可能超出語言模型的理解範疇。針對上述挑戰,本研究提出將 RAG 技術與 DoWhy 因果推理模型相結合,並通過專家訪談建構知識圖譜來優化檢索模組,增強系統處理非線性語意的能力,為企業在非結構化數據處理與智能化應用領域提供了實證支持。
    本研究結果顯示,文本塊大小對 RAG 系統的檢索與生成效果影響顯著,應根據文本長度動態調整,以平衡檢索範圍與語義完整性。相比之下,文本切割重疊率對系統效能的影響較小,因此文本切割策略應優先考量文本塊大小,而非依賴較大的重疊範圍來提升系統效能。;結合 DoWhy 因果推理的混合檢索策略,有效解決了 SOP 文檔中非線性或缺乏連貫性的特點,能夠捕捉文檔中的隱性因果邏輯,彌補模型在企業專業場景中的不足,同時避免企業機密信息外洩的風險,為檢索增強生成技術的優化與應用拓展提供了重要的實證支持。

    Extracting information from complex standard operating procedure (SOP) documents is a key challenge in enterprise applications. This study examines how text segmentation strategies impact Retrieval-Augmented Generation (RAG) performance and addresses the limitations of cosine similarity-based retrieval. Since enterprise SOPs often contain confidential data and specialized terminology beyond large language models’ (LLMs) scope, this research integrates RAG with the DoWhy causal inference model and expert-constructed knowledge graphs to enhance retrieval accuracy. Results show that text chunk size significantly influences retrieval and generation quality, while chunk overlap has minimal effect, making chunk size optimization more critical. Additionally, the DoWhy-based hybrid retrieval strategy captures implicit causal relationships, improving comprehension while reducing reliance on direct LLM training. These insights contribute to optimizing RAG applications in enterprise environments.

    摘要 ii EXTENDED ABSTRACT iii 誌謝 ix 目錄 x 表目錄 xiii 圖目錄 xv 第一章 緒論 1 1.1 研究背景 2 1.2 研究目的 3 1.3 研究貢獻 3 1.4 論文架構 4 第二章 相關文獻探討 5 2.1 大型語言模型的知識局限與檢索瓶頸 6 2.2 NLP、RAG 與 LangChain 的協作關係 6 2.3 RAG 技術的原理與應用 8 2.3.1 RAG 技術的基本原理 9 2.3.2 RAG 技術的應用 12 2.4 LangChain 框架的設計與應用13 2.4.1 LangChain 框架的架構14 2.4.2 LangChain 框架的應用16 2.5 文本切割對可讀性的影響16 2.6 因果推理輔助下的 RAG 檢索機制優化17 2.6.1 基於 DoWhy 的因果推理 18 2.7 知識圖譜20 2.7.1 自動化生成知識圖譜 GraphGPT 23 2.8 RAG 系統生成品質的評估26 2.8.1 雙因子變異數分析的應用 31 2.9 小結32 第三章 研究方法 33 3.1 系統架構 34 3.2 資料上傳與預處理模組35 3.2.1 主要處理步驟35 3.3 語意檢索模組38 3.3.1 主要處理步驟38 3.4 生成與因果推理模組40 3.4.1 關鍵字擷取40 3.4.2 匹配知識圖譜42 3.4.3 因果推理補充檢索45 3.5 LangChain 框架下文本切割策略的實驗51 3.5.1 文本塊大小與文本長度對檢索與生成效果的影響 51 3.5.2 文本切割重疊率對檢索與生成效果的影響 54 3.5.3 ROUGE 指標於生成結果評估之實作56 3.5.4 基於雙因子 ANOVA 的文本塊大小與文本長度影響分析 57 3.5.5 基於單因子 ANOVA 的文本切割重疊率影響分析 59 3.6 DoWhy 框架的因果推理檢索架構60 3.7 GraphGPT 生成知識圖譜的適用性63 第四章 實驗與分析 66 4.1 實驗流程 66 4.2 實驗環境與參數設定 68 4.3 實驗結果與分析68 4.3.1 文本塊大小與文本長度對檢索與生成效果的實驗分析 71 4.3.2 文本切割重疊率對檢索與生成效果的影響的實驗分析 83 4.3.3 因果推理輔助下的 RAG 檢索機制實驗分析86 4.3.4 GraphGPT 自動生成知識圖譜的適用性92 4.4 實驗總結 97 4.4.1 文本塊大小與文本長度對 F1 值的雙因子 ANOVA 分析 101 4.4.2 文本切割重疊率對 F1 值影響之單因子 ANOVA 檢定 107 第五章 結論與建議 112 5.1 結論112 5.2 未來研究方向114 參考文獻 115

    Anello, E. (2024). Improving retrieval-augmented generation: A survey on rag performance optimization. Journal of Artificial Intelligence Research, 58, 345–362.
    Carrascosa, I. P. (2023). Boosting large language model accuracy with retrieval-augmented generation (rag) and reranking. Journal of Artificial Intelligence Research.
    Cheng, J., & Lapata, M. (2016). Neural summarization by extracting sentences and words. In Proceedings of the 54th annual meeting of the association for computational linguistics.
    Dhelim, S., & Yaser, D. (2020). Rag: A survey on retrieval-augmented generation techniques. IEEE Transactions on Knowledge and Data Engineering.
    Edge, D., Trinh, H., & Cheng, N. (2024). From local to global: A graph rag approach to query-focused summarization. arXiv preprint arXiv:2404.16130.
    Feng, Z. (2023). Retrieval-augmented generation for large language models: A survey.arXiv preprint arXiv:2312.10997.
    Fisch, A., Talmor, A., & Jia, R. (2017). Reading wikipedia to answer open-domain questions. In Proceedings of the 55th annual meeting of the association for computational linguistics (pp. 1870–1879). Retrieved from https://aclanthology.org/P17-1171/
    Guinsburg, A. M., Bessone, M. I. D., & Caseiro, J. M. (2023). Use of a novel machine learning tool (”dowhy”) to compare mortality risk between high volume hemodiafiltration (hv-hdf) and hemodialysis (hd) patients in a large cohort from latin america(la). Journal of the American Society of Nephrology.
    Guu, K., Hashimoto, T., Oren, Y., & Liang, P. (2020). Retrieval-augmented language model pre-training. arXiv preprint arXiv:2002.08909.
    Hong, Z. (2024). A tale of trust and accuracy: Base vs. instruct llms in rag systems.arXiv preprint arXiv:2406.14972.
    Huang, C. C., Chen, H.-J., & Kuo, C.-c. (2023). Difference analysis of different background factors on work values. Journal of Taiwan Education Studies.
    Huang, S.-M. (2014). The comparison of reaction time among different levels of college female volleyball players (Master’s thesis, National Pingtung University of Educa-tion). Retrieved from https://hdl.handle.net/11296/anf2t5
    Juvekar, K., & Purwar, A. (2024). Cos-mix: Cosine similarity and distance fusion for improved information retrieval. arXiv preprint arXiv:2406.00638.
    Keith, D. (2023). A brief history of natural language processing. DATAVERSITY, 10(4),45–57.
    Kiciman, E., Ness, R., & Sharma, A. (2023). Causal reasoning and large language models: Opening a new frontier for causality. arXiv preprint arXiv:2305.00050.
    Lewis, P., Perez, E., Piktus, A., & Petroni. (2020). Retrieval-augmented generation for knowledge-intensive nlp tasks. In Advances in neural information processing systems.
    Li, X. (2023). The fewer splits are better: Deconstructing readability in sentence splitting. arXiv preprint arXiv:2302.00937.
    Lin, C.-Y. (2004). Rouge: A package for automatic evaluation of summaries. In Proceedings of the 2004 annual meeting of the association for computational linguistics.
    Liu, F. (2024). Optimizing rag techniques for automotive industry pdf chatbots: A case study with locally deployed ollama models. arXiv preprint arXiv:2408.05933.
    Mavromatis, E., & Karypis, G. (2024). Gnn-rag: Graph neural retrieval for large language model reasoning. arXiv preprint arXiv:2405.20139.
    Noy, N., Gao, X. L., Jain, A., & Narayanan. (2019). Industry-scale knowledge graphs:Lessons and challenges
    Pandya, K. (2023). Automating customer service using langchain: Building custom opensource gpt chatbot for organizations. arXiv preprint arXiv:2310.05421.
    Paulus, R., Xiong, C., & Socher, R. (2017). A deep reinforced model for abstractive summarization. arXiv preprint arXiv:1705.04304.
    Philip, J., & Liu, Q. (2020). Kg-bart: Knowledge graph-augmented bart for generative commonsense reasoning. arXiv preprint arXiv:2009.12677.
    Rajpurkar, P., & Zhang, J. (2016). Squad: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 conference on empirical methods in natural language processing.
    Sharma, A., Syrgkanis, V., & Zhang. (2021). Dowhy: Addressing challenges in expressing and validating causal assumptions. arXiv preprint arXiv:2108.13518.
    Shenoy, V. (2023). Graphgpt: A tool for generating knowledge graphs from text.Retrieved from https://github.com/varunshenoy/graphgpt (Accessed: 2024-02-06)
    Song, C.-W., Lee, Y.-K., & Tsai. (2024). A new pipeline for generating instruction dataset via rag and self fine-tuning. arXiv preprint arXiv:2408.05911.
    Sun, W., & Liu, T. (2016). Chinese word segmentation in natural language processing.Journal of Computational Linguistics, 42, 123–139.
    Tang, J., Yang, Y., Wei, W., & Shi, L. (2023). Graphgpt: Graph instruction tuning for large language models. arXiv preprint arXiv:2310.13023.
    Vaswani, A., Shazeer, N., Parmar, N., & Uszkoreit. (2017). Attention is all you need.In Advances in neural information processing systems.
    Wan, X. (2020). Research on rag technology applications in various fields. Journal of Artificial Intelligence Research, 69, 321–345.
    Wang, Y. (2024). Revolutionizing retrieval-augmented generation with enhanced pdf structure recognition. arXiv preprint arXiv:2401.12599. Retrieved from https://ar5iv.labs.arxiv.org/html/2401.12599
    Zhang, Y., Chen, X., & Liu, W. (2019). Advancements in retrieval-augmented generation technology. Proceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval.
    Zhao, L. (2023). Think and retrieval: A hypothesis knowledge graph enhanced medical large language models. arXiv preprint arXiv:2312.15883.

    下載圖示 校內:立即公開
    校外:立即公開
    QR CODE