Page 249 - 《软件学报》2026年第5期
P. 249
2128 软件学报 2026 年第 37 卷第 5 期
4.5.2 方法的有效性
本文所提出的方法依赖 LLM 的能力, LLM 尽管在多个领域展现了强大的能力, 它仍然存在一些问题.
首先, LLM 依赖于大量的计算资源, 而能力越强的模型, 调用的成本越高. 例如 GPT-4o 的调用成本是 GPT-4o-
mini 的 16.7 倍, 而 GPT-4 的调用成本是 GPT-4o 的 24 倍. 如果需要使用 LLM 全量分析更大规模的软件文档, 模
型的调用费用对于研究人员是一笔不小的开销. 我们未来将继续研究如何在分析的不同阶段使用不同能力的模
型, 来适配不同难度的任务, 同时在构建提示时使用更多的筛选措施, 只对必要问题构建提示, 减少模型请求次数,
从而降低模型调用的消耗.
其次, LLM 在指令跟随方面存在不稳定性, 即不完全按照指令进行分析和输出, 我们认为这是导致分析结果
不精确的重要原因. 对于配置间约束提取任务, 我们认为分析结果的正确性要求高于全面性要求, 因此为了降低
LLM 的不稳定性, 我们采取了数据预处理和配置标注、重点语句提示、添加少样本提示等多种措施, 来提高分析
的精确率, 从而提高分析的正确性. 在这方面我们的方法依然有优化空间.
5 总 结
配置约束提取问题是软件配置研究领域的重点问题, 而配置间约束提取是其中相对复杂的问题. 本文提出了
一种基于大语言模型提示工程的配置约束提取方法 LLM-Extractor, 通过自动化分析软件配置文档, 构建软件配置
与软件功能关联图, 并使用该图谱中存在的多配置关联子图, 提取配置间约束关系. 为了评估 LLM-Extractor 的有
效性, 本文基于 3 种流行的开源软件文档构建了评估数据集, 并基于该数据集验证了 LLM-Extractor 相对已有文
本分析方法 PracExtractor 的有效性, 实验结果表明, LLM-Extractor 在配置间约束提取问题上相对 PracExtractor 具
有显著优势, 在 F1 分数上具有至少 43.4% 的提升, 这证明了 LLM-Extractor 的有效性. 进一步的消融实验表明, 相
较于直接使用 LLM 分析整段配置文档, 使用多配置关联子图作为上下文能够显著提升 LLM 推断配置间约束的
效果. 未来本文将进一步改进软件配置-功能关联图的构建方法, 同时将数据源扩展到软件日志、注释等多元自然
语言信息, 抽取更多的关联关系, 提升配置间约束提取的效果.
References
[1] Wessels D, Nordström H, Jeffries A, et al. Squid: optimising Web delivery. 2024. https://www.squid-cache.org/
[2] Oracle. MySQL 5.7 reference manual. 2024. https://dev.mysql.com/doc/refman/5.7/en/server-configuration.html
[3] openGauss community. openGauss 5.0.0. 2024. https://docs-opengauss.osinfra.cn/en/docs/5.0.0/docs/DatabaseReference/guc-parameters.
html
[4] Cloudflare. Understanding how Facebook disappeared from the Internet. 2019. https://blog.cloudflare.com/october-2021-facebook-outage/
[5] Tencent Cloud. Tencent Cloud April 8 incident postmortem and situation statement. 2024 (in Chinese). https://cloud.tencent.com/
developer/article/2408984
[6] All GitHub services are experiencing significant disruptions—Incident report for GitHub. 2025. https://www.githubstatus.com/incidents/
kz4khcgdsfdv
[7] Kiciman E, Wang YM. Discovering correctness constraints for self-management of system configuration. In: Proc. of the 2004 Int’l Conf.
on Autonomic Computing. New York: IEEE, 2004. 28–35.
[8] Perrow C. Normal accidents: Living with high-risk technologies. Basic Books, 1984, 29(4): 630–632 [doi: 10.2307/2392945]
[9] Reason J. Human Error. Cambridge: Cambridge University Press, 1990. [doi: 10.1017/CBO9781139062367]
[10] Zhou SL, Li SS, Dong W, Wang J, Liao XK. Survey on software runtime configuration researches. Ruan Jian Xue Bao/Journal of
Software, 2024, 35(1): 63–86 (in Chinese with English abstract). http://www.jos.org.cn/1000-9825/6835.htm [doi: 10.13328/j.cnki.jos.
006835]
[11] Xu TY, Zhang JQ, Huang P, Zheng J, Sheng TW, Yuan D, Zhou YY, Pasupathy S. Do not blame users for misconfigurations. In: Proc. of
the 24th ACM Symp. on Operating Systems Principles. Farminton: ACM, 2013. 244–259. [doi: 10.1145/2517349.2522727]
[12] Liao XK, Zhou SL, Li SS, Jia ZY, Liu XD, He HC. Do you really know how to configure your software? Configuration constraints in
source code may help. IEEE Trans. on Reliability, 2018, 67(3): 832–846. [doi: 10.1109/TR.2018.2834419]
[13] Chen QR, Wang T, Legunsen O, Li SS, Xu TY. Understanding and discovering software configuration dependencies in cloud and

