Automated industrial optimization modeling requires reliable translation of natural-language requirements into solver-executable code. However, large language models often generate non-compilable models due to missing declarations, type inconsistencies, and incomplete dependency contexts. We propose a type-aware retrieval-augmented generation (RAG) method that enforces modeling entity types and minimal dependency closure to ensure executability. Unlike existing RAG approaches that index unstructured text, our method constructs a domain-specific typed knowledge base by parsing heterogeneous sources, such as academic papers and solver code, into typed units and encoding their mathematical dependencies in a knowledge graph. Given a natural-language instruction, it performs hybrid retrieval and computes a minimal dependency-closed context, the smallest set of typed symbols required for solver-executable code, via dependency propagation over the graph. We validate the method on two constraint-intensive industrial cases: demand response optimization in battery production and flexible job shop scheduling. In the first case, our method generates an executable model incorporating demand-response incentives and load-reduction constraints, achieving peak shaving while preserving profitability; conventional RAG baselines fail. In the second case, it consistently produces compilable models that reach known optimal solutions, demonstrating robust cross-domain generalization; baselines fail entirely. Ablation studies confirm that enforcing type-aware dependency closure is essential for avoiding structural hallucinations and ensuring executability, addressing a critical barrier to deploying large language models in complex engineering optimization tasks.


翻译:工业优化建模自动化需要将自然语言需求可靠地转换为求解器可执行代码。然而,大型语言模型常因缺失声明、类型不一致及依赖上下文不完整而生成不可编译的模型。本文提出一种类型感知的检索增强生成方法,通过强制建模实体类型与最小依赖闭包来确保可执行性。与现有索引非结构化文本的检索增强生成方法不同,本方法通过解析学术论文与求解器代码等异构源,将其转化为类型化单元,并在知识图中编码其数学依赖关系,从而构建领域专用的类型化知识库。给定自然语言指令,本方法执行混合检索,并通过在图上进行依赖传播,计算最小依赖闭包上下文——即生成求解器可执行代码所需的最小类型化符号集合。我们在两个约束密集的工业案例上验证了该方法:电池生产中的需求响应优化与柔性作业车间调度。在第一个案例中,本方法生成了包含需求响应激励与负荷削减约束的可执行模型,在保持盈利的同时实现了削峰填谷;传统检索增强生成基线方法均告失败。在第二个案例中,本方法持续生成可编译模型并达到已知最优解,展现了稳健的跨领域泛化能力;基线方法则完全失效。消融研究证实,强制类型感知的依赖闭包对于避免结构幻觉和确保可执行性至关重要,这解决了在复杂工程优化任务中部署大型语言模型的关键障碍。

0
下载
关闭预览

相关内容

大语言模型中的检索与结构化增强生成综述
专知会员服务
33+阅读 · 2025年9月17日
多模态检索增强生成综述
专知会员服务
40+阅读 · 2025年4月15日
多模态检索增强生成的综合综述
专知会员服务
44+阅读 · 2025年2月17日
定制化大型语言模型的图检索增强生成综述
专知会员服务
38+阅读 · 2025年1月28日
通过强化学习增强代码生成中的代码大语言模型:综述
专知会员服务
29+阅读 · 2025年1月1日
检索增强生成系统中的可信度:综述
专知会员服务
44+阅读 · 2024年9月18日
探究检索增强下的大模型知识边界
专知会员服务
56+阅读 · 2023年7月25日
基于模型的强化学习综述
专知
42+阅读 · 2022年7月13日
以BERT为例,如何优化机器学习模型性能?
专知
10+阅读 · 2019年10月3日
强化学习与文本生成
微信AI
41+阅读 · 2019年4月4日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
23+阅读 · 2009年12月31日
VIP会员
相关VIP内容
大语言模型中的检索与结构化增强生成综述
专知会员服务
33+阅读 · 2025年9月17日
多模态检索增强生成综述
专知会员服务
40+阅读 · 2025年4月15日
多模态检索增强生成的综合综述
专知会员服务
44+阅读 · 2025年2月17日
定制化大型语言模型的图检索增强生成综述
专知会员服务
38+阅读 · 2025年1月28日
通过强化学习增强代码生成中的代码大语言模型:综述
专知会员服务
29+阅读 · 2025年1月1日
检索增强生成系统中的可信度:综述
专知会员服务
44+阅读 · 2024年9月18日
探究检索增强下的大模型知识边界
专知会员服务
56+阅读 · 2023年7月25日
相关基金
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
23+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员