You can also skip formulation by clicking Solve.
You can also skip formulation by clicking Solve.
The short answer: LLMs are unreliable for optimization.
The long answer:
You might be asking "But wait, I thought LLMs were great at generating math?"
They are. LLMs are great at generating optimization formulations, but struggle to generate optimization code [2023 NeurIPS paper]. Because of this, responses are often infeasible (incorrect) or suboptimal (a solution, but not the best one). Plus, there's no guarantee the LLM formulation matches its code.
That's where we come in: NLOPT formulates optimization problems using an LLM, but directly translates the formulation into code.
Separating formulation from execution avoids unreliable LLM-generated code - we get the flexibility of LLM-generated formulations with the accuracy of deterministic optimization solvers.
NLOPT provides guaranteed optimality from the formulation, so given enough time and as long as your formulation accurately represents your problem, the solution NLOPT returns is guaranteed to be optimal (the best possible solution). Of course, if your problem is infeasible (unsolvable, there are no possible solutions), it will return that.
NLOPT fuses optimization formulations generated by language models with powerful, cutting-edge optimization solvers.
When a user enters a prompt, a language model is given three attempts to formulate the problem. Then, the "best" formulation is selected and revised by another language model to best represent the problem.
The formulation then undergoes a preprocessing step to properly render TeX and is presented to the user. The user can edit the formulation as desired.
Finally, the formulation is deterministically processed into code and passed to a solver. The solver returns a solution, which is presented to the user.
Optimization problems are problems with numbers that have an objectively "best" solution.
For example, the problem An apple is $2 and a banana is $1. Which fruit should I buy to save money? has numbers and an objectively best solution (the banana), so it is an optimization problem.
However, the problem What color should I paint my house? is subjective, so it is not an optimization problem (unless you add numbers).
We're sorry to hear that your prompt isn't working. If you haven't already, please try clicking "Solve" again a few more times. If errors persist, you're always welcome to join our discord to get help.
NLOPT is in alpha testing and currently has limited features. As of now, NLOPT can solve up to some NCMINLPs (Non-Convex Mixed-Integer Non-Linear Programs), provided all functions have a continuous Hessian. We anticipate expanding support for more specialized problems soon.
Please click here or join our discord to report bugs.
Please click here or join our discord to get help.