{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/optimus-0-3-using-large-language-models-to","title":"OptiMUS-0.3: Using Large Language Models to Model and Solve Optimization Problems at Scale","arxiv_id":"2407.19633","date":"2024-07-29","proceeding":null,"authors":["Ali AhmadiTeshnizi","Wenzhi Gao","Herman Brunborg","Shayan Talaei","Madeleine Udell"],"abstract":"Optimization problems are pervasive in sectors from manufacturing and distribution to healthcare. However, most such problems are still solved heuristically by hand rather than optimally by state-of-the art solvers because the expertise required to formulate and solve these problems limits the widespread adoption of optimization tools and techniques. We introduce a Large Language Model (LLM)-based system designed to formulate and solve (mixed integer) linear programming problems from their natural language descriptions. Our system is capable of developing mathematical models, writing and debugging solver code, evaluating the generated solutions, and improving efficiency and correctness of its model and code based on these evaluations. OptiMUS-0.3 utilizes a modular structure to process problems, allowing it to handle problems with long descriptions and complex data without long prompts. Experiments demonstrate that OptiMUS-0.3 outperforms existing state-of-the-art methods on easy datasets by more than 12% and on hard datasets (including a new dataset, NLP4LP, released with this paper that features long and complex problems) by more than 8%.","url_abs":"https://arxiv.org/abs/2407.19633v1","url_pdf":"https://arxiv.org/pdf/2407.19633v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"optimus-0-3-using-large-language-models-to","repo_url":"https://github.com/teshnizi/optimus","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.19633","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.19633"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/teshnizi/optimus","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":11,"ran_draft_wrong":2,"ran_honours":1,"unverified":1},"by_repo_kind":{"listed":{"samples":15,"ran":14,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0a6804b25b53643a","entry":"execute_code","repo":"teshnizi/optimus","repo_kind":"listed","path":"Reflexion.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/Reflexion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0a6804b25b53643a"}},{"code_sha256_prefix":"dab23c4f1db56c16","entry":"execute_code","repo":"teshnizi/optimus","repo_kind":"listed","path":"execute_code.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/execute_code.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dab23c4f1db56c16"}},{"code_sha256_prefix":"3400042ef10a04a1","entry":"extract_code","repo":"teshnizi/optimus","repo_kind":"listed","path":"Reflexion.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/Reflexion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3400042ef10a04a1"}},{"code_sha256_prefix":"1b35aeee4688c891","entry":"extract_code","repo":"teshnizi/optimus","repo_kind":"listed","path":"execute_code.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/execute_code.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b35aeee4688c891"}},{"code_sha256_prefix":"e55cc7e0d69fd4cc","entry":"extract_code_from_end","repo":"teshnizi/optimus","repo_kind":"listed","path":"target_code.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/target_code.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e55cc7e0d69fd4cc"}},{"code_sha256_prefix":"1b919c0f41cadd94","entry":"extract_json_from_end","repo":"teshnizi/optimus","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1b919c0f41cadd94"}},{"code_sha256_prefix":"8db12a3fbdb85d30","entry":"extract_json_from_end_backup","repo":"teshnizi/optimus","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8db12a3fbdb85d30"}},{"code_sha256_prefix":"637439f058a00607","entry":"extract_keep_remove","repo":"teshnizi/optimus","repo_kind":"listed","path":"variables.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/variables.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"637439f058a00607"}},{"code_sha256_prefix":"dfe55bee535745f0","entry":"extract_list_from_end","repo":"teshnizi/optimus","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/utils.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dfe55bee535745f0"}},{"code_sha256_prefix":"2a3974ba00dea130","entry":"extract_objective","repo":"teshnizi/optimus","repo_kind":"listed","path":"objective.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/objective.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2a3974ba00dea130"}},{"code_sha256_prefix":"edbd5ba229bb9dfc","entry":"extract_score","repo":"teshnizi/optimus","repo_kind":"listed","path":"parameters.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/parameters.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"edbd5ba229bb9dfc"}},{"code_sha256_prefix":"90629c8ff26c53f1","entry":"extract_score","repo":"teshnizi/optimus","repo_kind":"listed","path":"variables.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/variables.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"90629c8ff26c53f1"}},{"code_sha256_prefix":"729760725b6df4b3","entry":"get_param_code","repo":"teshnizi/optimus","repo_kind":"listed","path":"generate_code.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/generate_code.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"729760725b6df4b3"}},{"code_sha256_prefix":"a6bbc053b1dfeae4","entry":"get_var_code","repo":"teshnizi/optimus","repo_kind":"listed","path":"generate_code.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/generate_code.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a6bbc053b1dfeae4"}},{"code_sha256_prefix":"4667ece67c9e29d5","entry":"extract_score_constraint_model","repo":"teshnizi/optimus","repo_kind":"listed","path":"constraint_model.py","file_url":"https://github.com/teshnizi/optimus/blob/HEAD/constraint_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4667ece67c9e29d5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}