| 研究生: |
周暘烜 Chou, Yang-Syuan |
|---|---|
| 論文名稱: |
針對高風險工業場景之大型語言模型韌性與隱私保護中介層架構設計 Design of a Resilient and Privacy-Preserving Middleware Architecture for Large Language Models in High-Stakes Industrial Environments |
| 指導教授: |
蕭宏章
Hsiao, Hung-Chang |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 資訊工程學系 Department of Computer Science and Information Engineering |
| 論文出版年: | 2026 |
| 畢業學年度: | 114 |
| 語文別: | 中文 |
| 論文頁數: | 67 |
| 中文關鍵詞: | 大型語言模型 、檢索增強生成 、中介層 、韌性 、隱私保護 |
| 外文關鍵詞: | Large Language Models, RAG, Middleware, Resilience, Privacy Preservation |
| 相關次數: | 點閱:12 下載:0 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
隨著檢索增強生成 (RAG) 技術在高風險工業場景落地,系統瓶頸已由模型能力本身擴展到中介層的韌性、隱私與成本控制。本研究提出位於客戶端的 Resilient PrivacyMiddleware (RPM),整合嚴格權杖桶限流、結構感知語意快取與可逆 schema 去識別化三層機制,並在真實半導體製造資料集(52 Tables, 165 Queries)上進行受控實驗。結果顯示:啟用快取可將平均 API 呼叫數由 25.29 降至 4.99(約 80%),而平均 F1 僅有有限變動;Level 1 去識別化在 retriever 層級僅造成約 5.2% F1 損失;在方法層比較中,UQ-BO 與 Random 的 F1 差異不顯著(p = 0.137),但 API 成本差距達 3.3 倍。此結果支持本文核心主張:在本研究設定下,工業 RAG 部署中的中介層策略差異,對部署成本與可用性的影響至少與演算法差異同等重要,因此應被視為可獨立檢驗的系統研究對象。
Industrial retrieval-augmented generation (RAG) systems depend not only on model quality but also on the middleware that controls requests to external large language model services. This thesis presents Resilient Privacy Middleware (RPM), a client-side architecture for high-stakes industrial environments. RPM combines strict token-bucket rate limiting, structure-aware semantic caching, and reversible schema de-identification in one enforced request pipeline. The design is evaluated on a semiconductor manufacturing dataset containing 52 tables and 165 processed queries through controlled experiments covering middleware ablation, privacy levels, multiple providers, and quota constrained stress conditions. Enabling caching reduces average API calls from 25.29 to 4.99, an approximately 80% reduction, with only limited change in average F1. Level 1 de-identification provides the most practical privacy-utility trade-off, while stronger obfuscation reduces completion rates and introduces survivorship bias. In stress tests, proactive traffic shaping reduces HTTP 429 responses by 25% to 42% and completion time by 31% to 36% relative to a naive baseline. The results show that middleware policy can affect cost, availability, and privacy as strongly as algorithm selection, and should therefore be evaluated as an independent systems research object.
[1] P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W.-t. Yih, T. Rocktäschel, S. Riedel, and D. Kiela, “Retrieval-augmented generation for knowledge-intensive NLP tasks,” in Advances in Neural Information Processing Systems, vol. 33, pp. 9459–9474, 2020.
[2] C. Ouerghemmi and M. Ertz, “Integrating large language models into digital manufacturing: A systematic review and research agenda,” Computers, vol. 14, no. 8, p. 318, 2025.
[3] T. Wang, B. Zhang, D. Jiang, and D. Li, “A multimodal large language model framework for intelligent perception and decision-making in smart manufacturing,” Sensors, vol. 25, no. 10, p. 3072, 2025.
[4] B. Beyer, C. Jones, J. Petoff, and N. R. Murphy, Site Reliability Engineering: How Google Runs Production Systems. O’Reilly Media, 2016.
[5] B. Beyer, N. R. Murphy, D. K. Rensin, K. Kawahara, and S. Thorne, The Site Reliability Workbook: Practical Ways to Implement SRE. O’Reilly Media, 2018.
[6] T. Yu, R. Zhang, K. Yang, M. Yasunaga, D. Wang, Z. Li, J. Ma, I. Li, Q. Yao, S. Roman, et al., “Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task,” in Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3911–3921, 2018.
[7] J. Li, B. Hui, G. Qu, B. Yang, B. Li, B. Qin, R. Geng, N. Huo, F. Li, J.-G. Huang, et al., “BIRD: A benchmark for biomedical and broad-domain text-to-SQL,” Advances in Neural Information Processing Systems Datasets and Benchmarks Track, 2024.
[8] Y. Gao, Y. Xiong, X. Gao, K. Jia, J. Pan, Y. Bi, Y. Dai, J. Sun, M. Wang, et al., “Retrieval-augmented generation for large language models: A survey,” arXiv preprint arXiv:2312.10997, 2024.
[9] L. Brehme, B. Dornauer, T. Ströhle, M. Ehrhart, and R. Breu, “Retrieval-augmented generation in industry: An interview study on use cases, requirements, challenges, and evaluation,” arXiv preprint arXiv:2508.14066, 2025. arXiv preprint.
[10] M. A. Mohammed, J. R. Talburt, L. Claassens, and A. Marais, “Retrieval-augmented multi-LLM ensemble for industrial part specification extraction,” arXiv preprint arXiv:2601.05266, 2026. Presented at the 17th International Conference on Knowledge and Systems Engineering (ICKSE).
[11] V. Zhong, C. Xiong, and R. Socher, “Seq2SQL: Generating structured queries from natural language using reinforcement learning,” arXiv preprint arXiv:1709.00103, 2017.
[12] X. Xu, C. Liu, and D. Song, “SQLNet: Generating structured queries from natural language without reinforcement learning,” arXiv preprint arXiv:1711.04436, 2017.
[13] T. Yu, R. Zhang, H. Er, S. Li, E. Xue, B. Pang, X. V. Lin, Y. C. Tan, T. Shi, Z. Li, et al., “CoSQL: A conversational text-to-SQL challenge towards cross-domain natural language interfaces to databases,” in Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing, pp. 1962–1979, 2019.
[14] H. Zhang, R. Cao, H. Xu, L. Chen, and K. Yu, “CoE-SQL: In-context learning for multi-turn text-to-SQL with chain-of-editions,” in Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 6487–6508, 2024.
[15] C. Li, Y. Wang, Z. Wu, Z. Yu, F. Zhao, S. Huang, and X. Dai, “MultiSQL: A schema-integrated context-dependent text2SQL dataset with diverse SQL operations,” in Findings of the Association for Computational Linguistics: ACL 2024, pp. 13857–13867, 2024.
[16] V. Karpukhin, B. Oguz, S. Min, P. Lewis, L. Wu, S. Edunov, D. Chen, and W.-t. Yih, “Dense passage retrieval for open-domain question answering,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, pp. 6769–6781, 2020.
[17] L. Shi, Z. Tang, and Z. Yang, “A survey on employing large language models for text-to-SQL tasks,” arXiv preprint arXiv:2407.15186, 2024.
[18] X. Liu, S. Shen, B. Li, P. Ma, R. Jiang, Y. Zhang, J. Fan, G. Li, N. Tang, and Y. Luo, “A survey of text-to-SQL in the era of LLMs: Where are we, and where are we going?,” arXiv preprint arXiv:2408.05109, 2024.
[19] J. Snoek, H. Larochelle, and R. P. Adams, “Practical Bayesian optimization of machine learning algorithms,” in Advances in Neural Information Processing Systems, vol. 25, 2012.
[20] B. Shahriari, K. Swersky, Z. Wang, R. P. Adams, and N. de Freitas, “Taking the human out of the loop: A review of Bayesian optimization,” Proceedings of the IEEE, vol. 104, no. 1, pp. 148–175, 2016.
[21] Amazon Web Services, “Exponential backoff and jitter.” https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/, 2015. Accessed: 2026-02-28.
[22] J. Heinanen, R. Guerin, et al., “A single rate three color marker.” IETF RFC 2697, 1999. Informational RFC.
[23] M. T. Nygard, Release It!: Design and Deploy Production-Ready Software. Pragmatic Bookshelf, 2 ed., 2018.
[24] M. Fowler, “Circuit breaker.” https://martinfowler.com/bliki/CircuitBreaker.html, 2014. Accessed: 2026-03-02.
[25] J. L. Hellerstein, Y. Diao, S. Parekh, and D. M. Tilbury, Feedback Control of Computing Systems. Wiley-IEEE Press, 2004.
[26] S. Abedini, S. Mohapatra, D. B. Emerson, M. Shafieinejad, J. C. Cresswell, and X. He, “MaskSQL: Safeguarding privacy for LLM-based text-to-SQL via abstraction,” arXiv preprint arXiv:2509.23459, 2025. Accepted to the NeurIPS 2025 Workshop on Regulatable Machine Learning.
[27] O. Feyisetan, T. Diethe, and T. Drake, “Privacy- and utility-preserving textual analysis via calibrated multivariate perturbations,” in Proceedings of the 13th ACM International Conference on Web Search and Data Mining, pp. 178–186, 2020.
[28] A. Borah, S. Ghosh, K. Joshi, A. K. Guru, and K. Ghosh, “Don’t judge a book by its cover: Assessing llm’s confidence and performance under logical obfuscation in python programming tasks,” arXiv preprint arXiv:2602.01132, 2026.
[29] N. Li, W. Qardaji, and D. Su, “On the tradeoff between privacy and utility in data publishing,” in Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 517–526, 2009.
[30] T. Diethe, O. Feyisetan, B. Balle, and T. Drake, “Preserving privacy in analyses of textual data,” Amazon Science, 2020. Research summary for WSDM 2020 work.
[31] GPTCache Team, “GPTCache: An open-source semantic cache for LLM applications.” https://github.com/zilliztech/GPTCache, 2023. Accessed: 2026-02-28.
[32] N. Reimers and I. Gurevych, “Sentence-BERT: Sentence embeddings using Siamese BERT-networks,” in Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing, pp. 3982–3992, 2019.
[33] N. Muennighoff, N. Tazi, L. Magne, and N. Reimers, “MTEB: Massive text embedding benchmark,” arXiv preprint arXiv:2210.07316, 2023.
[34] J. Dean and L. A. Barroso, “The tail at scale,” Communications of the ACM, vol. 56, no. 2, pp. 74–80, 2013.
[35] J. C. Mogul, “Emergent (mis)behavior vs. complex software systems,” in Proceedings of the 10th Workshop on Hot Topics in Operating Systems, pp. 293–304, 2005.
[36] N. Tishby, F. C. Pereira, and W. Bialek, “The information bottleneck method,” arXiv preprint physics/0004057, 2000.
[37] R. Shwartz-Ziv and N. Tishby, “Opening the black box of deep neural networks via information,” arXiv preprint arXiv:1703.00810, 2017.
[38] E. Tabassi, “Artificial intelligence risk management framework (AI RMF 1.0),” Tech. Rep. NIST AI 100-1, National Institute of Standards and Technology, 2023.
[39] C. Autio, R. Schwartz, J. Dunietz, S. Jain, M. Stanley, E. Tabassi, P. Hall, and K. Roberts, “Artificial intelligence risk management framework: Generative artificial intelligence profile,” Tech. Rep. NIST AI 600-1, National Institute of Standards and Technology, 2024.
[40] OWASP GenAI Security Project, “2025 top 10 risk and mitigations for LLMs and genAI apps.” https://genai.owasp.org/llm-top-10/, 2025. Accessed: 2026-03-14.
[41] R. Chandramouli, Z. Butcher, and J. Callaghan, “Service mesh proxy models for cloud-native applications,” Tech. Rep. NIST SP 800-233, National Institute of Standards and Technology, 2024.
[42] J. J. Heckman, “Sample selection bias as a specification error,” Econometrica, vol. 47, no. 1, pp. 153–161, 1979.