OptiChat 数据集
收藏资源简介:
OptiChat 数据集由普渡大学戴维森化学工程学院的研究团队开发,旨在评估 OptiChat 系统在解释优化模型时的性能。该数据集包含 172 个问答对,涵盖了诊断、检索、敏感性、假设和反事实查询五类问题。数据集的内容基于 24 个优化模型,这些模型来自 GAMS 模型库、Pyomo Cookbook 和公开的 GitHub 教程,涵盖了供应链、制造、石油精炼、工业调度等多个领域。数据集的创建过程包括从实际应用中收集问题,并通过专家验证和调整以确保其准确性和实用性。该数据集的应用领域主要集中在帮助非专家用户理解和使用优化模型,旨在解决优化模型与用户之间的沟通障碍,提升决策效率。
The OptiChat Dataset was developed by a research team from the Davidson School of Chemical Engineering at Purdue University, aiming to evaluate the performance of the OptiChat system in explaining optimization models. This dataset contains 172 question-answer pairs, covering five types of queries: diagnostic, retrieval, sensitivity, hypothetical, and counterfactual queries. The content of the dataset is based on 24 optimization models sourced from the GAMS Model Library, Pyomo Cookbook, and publicly available GitHub tutorials, spanning multiple domains including supply chain, manufacturing, petroleum refining, and industrial scheduling. The dataset creation process involves collecting questions from real-world applications, followed by expert validation and refinement to ensure its accuracy and practicality. The primary application scope of this dataset is to assist non-expert users in understanding and utilizing optimization models, with the goal of bridging the communication gap between optimization models and end-users, and improving decision-making efficiency.
OptiChat 数据集概述
数据集简介
OptiChat 是一个基于 GPT-4 大语言模型(LLM)的交互式对话系统,结合了 Gurobi、Pyomo、预定义函数和代码生成技术,旨在帮助从业者通过自然语言与优化模型进行交互。该项目的目标是通过 LLM 解释优化模型,从而缩小从业者与优化模型之间的差距。
数据集特点
- 支持的模型类型:OptiChat 支持使用 Pyomo 编写的可行/不可行优化模型。
- 支持的查询类型:包括诊断、检索、敏感性分析、假设分析和反事实分析等查询。
数据集结构
- 模型库:模型库位于
Feas和Infeas文件夹中,分别包含可行和不可行的优化模型。 - 模型开发:OptiChat 目前仅支持使用 Pyomo 编写的优化模型。开发模型时,建议为模型组件添加注释(doc),以便 OptiChat 更好地生成模型描述。
安装与使用
-
安装依赖:
- 安装 Python3 和 pip。
- 使用
pip install -r requirements.txt安装 Python 包(注意:requirements.txt 文件尚未更新,可能存在兼容性问题)。 - 安装 Gurobi,并按照提供的视频教程进行配置。
- 申请 OpenAI API 密钥,并将其添加到环境变量中。
-
运行测试:
- 在根目录下运行
pytest tests/以检查 Gurobi 和 GPT 的安装是否成功。 - 运行
streamlit run app.py启动聊天机器人。
- 在根目录下运行
-
使用教程:
- 在
Upload Model下选择模型文件(仅支持 .py 文件)。 - 加载模型以生成初始描述并熟悉问题背景。
- 使用聊天界面提交查询。
- 在
引用
如果您发现此工作有用,请引用以下文献: bibtex @misc{OptiChat2025, title={OptiChat: Bridging Optimization Models and Practitioners with Large Language Models}, author={Hao Chen and Gonzalo Esteban Constante-Flores and Krishna Sri Ipsit Mantri and Sai Madhukiran Kompalli and Akshdeep Singh Ahluwalia and Can Li}, year={2025}, eprint={2501.08406}, archivePrefix={arXiv}, primaryClass={cs.HC}, url={https://arxiv.org/abs/2501.08406}, }
bibtex @article{OptiChat2023, author = {Chen, Hao and Constante-Flores, Gonzalo~E. and Li, Can}, doi = {10.1080/03155986.2024.2385189}, issue = {0}, journal = {INFOR: Information Systems and Operational Research}, publisher = {Taylor & Francis}, title = {Diagnosing infeasible optimization problems using large language models}, volume = {62}, number = {4}, pages = {1-15}, url = {https://doi.org/10.1080/03155986.2024.2385189}, year = {2024}, }

- 1OptiChat: Bridging Optimization Models and Practitioners with Large Language Models普渡大学戴维森化学工程学院 · 2025年



