研究生: |
張力升 Chang, Li-Sheng |
---|---|
論文名稱: |
結合圖譜檢索之語言模型保守回應分析與改善研究—以食譜任務為例 Analysis and Mitigation of Conservative Responses in Recipe Language Models using Graph-RAG |
指導教授: |
莊坤達
Chuang, Kun-Ta |
學位類別: |
碩士 Master |
系所名稱: |
電機資訊學院 - 資訊工程學系 Department of Computer Science and Information Engineering |
論文出版年: | 2025 |
畢業學年度: | 113 |
語文別: | 英文 |
論文頁數: | 67 |
中文關鍵詞: | 自然語言處理 、GraphRag 、Prompt |
外文關鍵詞: | NLP, GraphRag, Prompt |
相關次數: | 點閱:8 下載:0 |
分享至: |
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
隨著人工智慧(Artificial Intelligence, AI)技術日益成熟,其應用已逐漸滲透至人們日常生活的各個層面,從工作流程的自動化、學習效率的提升,到日常生活中的資訊獲取與輔助決策,皆可見 AI 所帶來的便利與改變。特別是在自然語言處理(Natural Language Processing, NLP)領域,透過語言模型進行文字處理與生成,可顯著提升各類任務的執行效率,實現事半功倍的成效。然而,語言模型本質上仍存在語言回答不精準的狀況,尤其在涉及生活知識與具體事實查詢時,造成使用者在關鍵情境下遭遇困擾與誤導。
為解決此問題,本論文提出一套名為 GraphGuard 的系統架構,結合檢索式增強生成(Retrieval-Augmented Generation, RAG),透過結構化圖譜建模與外部知識檢索,有效抑制語言模型回答保守的現象。我們以食譜資料作為應用場景,將食譜拆解為節點(食材、步驟、處理方式等)與其間的語意關係,構建知識圖譜,進行多模型比較實驗(包括 GPT-4o、GPT-3.5、 LLaMA 3等),以驗證本系統於實務應用中的穩定性與優越性。
As artificial intelligence (AI) technology continues to advance, its applications have gradually permeated various aspects of daily life. From the automation of work processes and the enhancement of learning efficiency to information retrieval and decision-making assistance in everyday scenarios, the convenience and transformation brought by AI have become increasingly evident. In particular, in the field of natural language processing (NLP), the use of language models for text understanding and generation has significantly improved task performance across multiple domains. However, these models inherently carry the risk of producing imprecise or overly cautious responses, especially when dealing with real-world knowledge or factual queries, which can lead to misleading or incorrect information—potentially causing confusion in critical situations.
To address this issue, this thesis proposes a systematic framework named GraphGuard, which integrates the concept of retrieval-augmented generation (RAG) with graph-based knowledge modeling. By leveraging external knowledge retrieval and structured graph representations, the proposed architecture aims to mitigate the hallucination problem in large language models. In our study, we adopt recipe data as the experimental domain, decomposing each recipe into semantic nodes (for example: ingredients, cooking steps, seasoning methods) and their relationships to construct a knowledge graph. We further conduct comparative evaluations using multiple language models, including GPT-4o, GPT-3.5 , LLaMA 3, to demonstrate the effectiveness and robustness of our framework in practical applications.
[1]Patrick Lewis , Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler,Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, Douwe KielaRetrieval-Augmented Generation for Knowledge-ntensive NLP Tasks.arXiv:2005.11401 , NeurIPS 2020, URL: https://arxiv.org/pdf/2005.11401
[2]Darren Edge1 , Ha Trinh1 , Newman Cheng, Joshua Bradley, Alex Chao, Apurva Mody, Steven Truitt , Dasha Metropolitansky, Robert Osazuwa Ness, Jonathan Larson. From Local to Global A Graph RAG Approach toQuery-Focused Summarization arXiv:2404.16130 , URL: https://arxiv.org/abs/2404.16130
[3]Microsoft, “GraphRAG: Retrieval-augmented generation with graph-structured context,” [Online]. Available: https://aka.ms/graphrag. [Accessed: Jun. 22, 2025]
[4]Mathieu Ravaut, Hao Zhang, Lu Xu, Aixin Sun, Yong Liu . Parameter-Efficient Conversational Recommender System as a Language Processing Task URL: https://arxiv.org/abs/2401.14194, EACL 2024
[5]Yeongseo Jung, Eunseo Jung, Lei Chen . Towards a Unified Conversational Recommendation System: Multi-task Learning via Contextualized Knowledge Distillation.URL: https://aclanthology.org/2023.emnlp-main.840.pdf , EMNLP 2023
[6]Javier Marin, Aritro Biswas, Ferda Ofli, Nicholas Hynes, Amaia Salvador, Yusuf Aytar, Ingmar Weber, Antonio Torralba Recipe1M+: A Dataset for Learning Cross-Modal Embeddings for Cooking Recipes and Food Images IEEE Transactions on Pattern Analysis and Machine Intelligence , URL: https://arxiv.org/abs/1810.06553
[7]Hongfu Liu, Hengguan Huang, Xiangming Gu, Hao Wang, Ye Wang On Calibration of LLM based Guard Models for Reliable Content Moderation ICLR 2025, URL: https://arxiv.org/abs/2410.10414
[8]Yao Xu, Shizhu He, Jiabei Chen, Zihao Wang, Yangqiu Song, Hanghang Tong, Guang Liu, Kang Liu, Jun Zhao Generate-on-Graph: Treat LLM as both Agent and KG in Incomplete Knowledge Graph Question Answering EMNLP 2024, URL: ttps://arxiv.org/abs/2404.14741
[9]Alfred Clemedtson, Borun Shi GraphRAFT: Retrieval Augmented Fine-Tuning for Knowledge Graphs on Graph Databases URL: https://arxiv.org/abs/2504.05478
[10]Alina Leidinger, Robert van Rooij, Ekaterina Shutova The language of prompting: What linguistic properties make a prompt successful EMNLP 2023, URL: https://aclanthology.org/2023.findings-emnlp.618/
[11]Ting Xu, Haiqin Yang, Fei Zhao, Zhen Wu, Xinyu Dai A Two-Agent Game for Zero-shot Relation Triplet Extraction ACL Findings 2024, URL: https://aclanthology.org/2024.findings-acl.446/
[12]Irkaal, “Food.com Recipes and Interactions Dataset,” Kaggle, 2022. [Online]. Available: https://www.kaggle.com/datasets/irkaal/foodcom-recipes-and-reviews
[13]Xiaoxin He · Yijun Tian · Yifei Sun · Nitesh Chawla · Thomas Laurent · Yann LeCun · Xavier Bresson · Bryan Hooi G-Retriever: Retrieval-Augmented Generation for Textual Graph Understanding and Question Answering NeurIPS 2024, URL: https://arxiv.org/pdf/2402.07630
[14]Neo4j Documentation. (2024). The Property Graph Model. https://neo4j.com/docs/getting-started/current/graphdb-concepts
[15]Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to Algorithms (3rd ed., pp. 531–549). MIT Press.
[16]Qiuyi Lyu, Mo Sha, Bin Gong, Kuangda LyuAuthors Info & Claims Accelerating Depth-First Traversal by Graph Ordering ACM. URL: https://doi.org/10.1145/3468791.3468796
[17]Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to Algorithms (3rd ed., pp. 595–601). MIT Press.
[18]LangChain Contributors. (2024). LLMGraphTransformer (Version 0.3.5) [Computer software]. GitHub. https://github.com/langchain-ai/langchain/tree/master/libs/experimental/langchain_experimental/graph_transformers
[19]LangChain Contributors. (2024). ChatPromptTemplate API documentation. Retrieved from https://python.langchain.com/docs/modules/model_io/prompts/chat
[20]Scott Barnett, Stefanus Kurniawan, Srikanth Thudumu, Zach Brannelly, Mohamed Abdelrazek Seven Failure Points When Engineering a Retrieval Augmented Generation System SE4AI 2024, URL: https://arxiv.org/abs/2401.05856
[21]Qingfei Zhao, Ruobing Wang, Yukuo Cen, Daren Zha, Shicheng Tan, Yuxiao Dong, Jie Tang LongRAG: A Dual Perspective RAG Paradigm for Long Context QA EMNLP 2024, https://arxiv.org/abs/2410.18050
[22]Wenhao Yu, Chenguang Zhu, Zhihan Zhang, Shuohang Wang, Zhuosheng Zhang, Yuwei Fang, Meng Jiang Retrieval Augmentation for Commonsense Reasoning: A Unified Approach EMNLP 2022, URL: https://arxiv.org/abs/2210.12887
[23]Xiangrong Zhu, Yuexiang Xie, Yi Liu, Yaliang Li, Wei Hu Knowledge Graph-Guided Retrieval Augmented Generation NAACL 2025, URL: https://arxiv.org/abs/2502.06864
[24]Antoine Bosselut, Hannah Rashkin, Maarten Sap, Chaitanya Malaviya, Asli Celikyilmaz, Yejin Choi COMET: Commonsense Transformers for Automatic Knowledge Graph Construction ACL 2020, URL: https://arxiv.org/abs/1906.05317
[25]Haitian Sun, Tania Bedrax-Weiss, William W. Cohen PullNet: Open Domain Question Answering with Extractive Pulling and Multi-hop Reasoning ACL 2019, URL: https://arxiv.org/abs/1904.09537
[26]Namyong Park, Andrey Kan, Xin Luna Dong, Tong Zhao, Christos Faloutsos Estimating Node Importance in Knowledge Graphs Using Graph Neural Networks KDD 2019, URL: https://arxiv.org/abs/1905.08865
[27]Jiaxin Shi, Shulin Cao, Lei Hou, Juanzi Li, Hanwang Zhang TransferNet: An Effective and Transparent Framework for Multi-hop Question Answering over Relation Graph EMNLP 2021, URL: https://aclanthology.org/2021.emnlp-main.341/
[28]Makbule Gulcin Ozsoy, Leila Messallem, Jon Besga, Gianandrea Minneci Text2Cypher: Bridging Natural Language and Graph Databases GenAIK 2025, URL: https://arxiv.org/abs/2412.10064
[29]Alon Talmor,1,2 Jonathan Herzig,1 Nicholas Lourie2 Jonathan Berant1,2 CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledge NAACL 2019 , URL: https://aclanthology.org/N19-1421/