optimization-intent-router
Skill472 starsChanged 9 months agoApache-2.0View on GitHub
Classify whether a data-backed request is LP, MILP, QP, routing, or non-optimization analytics.
In this repository8 other files it gives its agents.
- cuopt-agent/AGENTS.mdAGENTS.md
- cuopt-debuggingSkill
- generic-max-supplySkill
- cuopt-model-mapperSkill
- cuopt-sandboxSkill
- optimization-from-data-orchestratorSkill
- optimization-mode-routerSkill
- tabular-optimization-ingestionSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 18 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Use this skill when a user asks a question in natural language and it is not yet clear whether the request should be handled as:
- Distinctive: line 34
Instead they ask questions like:
- Distinctive: line 50
Use structure, not exact keywords:
- Distinctive: line 59
NemoClaw sandbox: When constructive + constraint data →
- Very specific: line 60
cuopt-sandboxgates immediately: before any schedule, roster, assignment, or route output — regardless of whether the user said minimize … - Distinctive: line 69
If the user is only asking for:
- Very specific: line 97
When weaker signals appear, inspect whether there are real constraints and decisions.
- Distinctive: line 146
If the user is maximizing a quadratic expression, note that the modeling path may require reformulation as a minimization of the negated …
- Distinctive: line 149
Use routing when the decisions are fundamentally about movement through locations.
- Distinctive: line 169
Do not route to cuOpt when the user is asking for:
- Distinctive: line 180
If it is unclear whether the request is optimization or analytics, ask a concise clarifier such as:
- Distinctive: line 185
If it is clearly optimization but unclear which family applies, ask the minimum clarifier needed.
- Distinctive: line 194
Before handing off, produce an internal working conclusion with at least:
- Very specific: line 215
If is_optimization = yes and there is a meaningful signal that replayability, audit, export, or reuse may matter:
- Very specific: line 216
use optimization-mode-router before deep data interpretation or model construction
- Distinctive: line 219
do not invoke cuOpt just because the data could in theory be optimized
- Distinctive: line 248
do not route to cuOpt
- Distinctive: line 252
Do not label a request as optimization only because it contains numbers.
- Distinctive: line 253
Do not force a routing interpretation when the task is really allocation or assignment without path planning.
- Distinctive: line 254
Do not force LP/MILP when the question is clearly descriptive analytics.
- Distinctive: line 255
Prefer one short clarifying question over building the wrong model.
- Distinctive: line 256
When the user asks for the best decision under constraints, prefer optimization even if they do not use formal mathematical language.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Optimization Intent Router
Use this skill when a user asks a question in natural language and it is not yet clear whether the request should be handled as:
- a numerical optimization problem (LP / MILP / QP)
- a routing problem (VRP / TSP / PDP)
- or a non-optimization task such as analytics, filtering, aggregation, forecasting, or explanation
This skill exists to decide whether cuOpt should be involved at all, and if so, which downstream formulation path should be used.
The classification from this skill is provisional. A later data-ingestion step may refine or correct the problem family if the uploaded tables clearly support a different interpretation.
Purpose
The user often does not say:
- "this is an LP"
- "this is a MILP"
- "this is a routing problem"
Instead they ask questions like:
- "What’s the best production plan?"
- "How should we allocate inventory?"
- "What’s the optimal sales mix?"
- "How many trucks should go to each depot?"
- "Can you minimize delivery cost?"
Your job is to recognize when the request is really asking for an optimization model.
Core rule
Route to optimization when the user wants a plan produced under constraints — assignment, schedule, allocation, route, mix, or mix of resources — whether they say feasible/valid, minimize/maximize, or best/optimal.
Use structure, not exact keywords:
| Signal | Route to cuOpt? |
| Constructive + constraint tables (uploaded or referenced) | Yes — family TBD (MILP/LP/QP/routing) |
| Minimize / maximize / best / optimal / least cost | Yes |
| Feasible / valid / make it work / respect rules (constructive) | Yes — feasibility = hard constraints |
| Summarize / chart / filter / explain data only | No |
NemoClaw sandbox: When constructive + constraint data →
cuopt-sandbox gates immediately before any schedule, roster,
assignment, or route output — regardless of whether the user said
minimize or optimal. Do not use a greedy Python builder as a first
deliverable.
Paraphrase examples (non-exhaustive): "plan the season", "set game times",
"fill the calendar", "assign shifts", "put jobs on machines", "build a
schedule" — same intent. See cuopt-sandbox/references/intent-and-triggers.md.
If the user is only asking for:
- descriptive statistics
- filtering
- counting
- sorting
- charting
- SQL-style aggregation
- explanation of existing data
then do not force the request into optimization.
Signals that this is an optimization task
Strong signals:
- words like optimize, optimal, best, maximize, minimize
- build / create / assign a schedule, roster, shift plan, or calendar from structured data (sandbox: treat as MILP even without minimize)
- resource tradeoffs: capacity, budget, time, labor, inventory, demand, hours, materials
- decision language: how much, how many, which, assign, allocate, route, schedule, choose
- explicit constraints: at most, at least, must, cannot exceed, within budget, limited by
- competing objectives: profit vs capacity, cost vs service, coverage vs distance
Weaker but meaningful signals:
- "What should we do?"
- "What is the best plan?"
- "How should we allocate this?"
- "How can we reduce cost while meeting demand?"
When weaker signals appear, inspect whether there are real constraints and decisions. If yes, treat it as optimization — and in the NemoClaw sandbox, cuopt-sandbox gates apply immediately (probe before any schedule/heuristic output).
Route classification
Route to LP
Use LP when:
- the objective is linear
- the constraints are linear
- decision variables can be continuous or fractional
Common examples:
- product mix
- production planning
- blending
- budget allocation
- transportation flow without integrality requirements
Route to MILP
Use MILP when:
- the model is otherwise linear
- but some decisions must be integer or binary
Common signals:
- units must be whole numbers
- yes/no decisions
- open/close decisions
- assign-or-not decisions
- minimum lot sizes
- discrete staffing or vehicle counts
Common examples:
- facility opening
- workforce scheduling with headcounts
- assignment with binary decisions
- product counts that must be whole
- slot/resource scheduling (games, shifts, appointments → time slots and resources) — including when the user only says "build a schedule"
Route to QP
Use QP when:
- the objective contains squared terms or interactions
- the user wants quadratic minimization under linear constraints
Common signals:
- variance minimization
- least squares
- portfolio optimization with covariance / risk terms
- quadratic penalty terms
If the user is maximizing a quadratic expression, note that the modeling path may require reformulation as a minimization of the negated objective.
Route to routing
Use routing when the decisions are fundamentally about movement through locations.
Common signals:
- deliveries
- pickups and dropoffs
- stops
- depots
- vehicles
- routes
- travel time / distance / cost matrices
- time windows
- capacities on vehicles
- pickup-delivery pairing
Common routing types:
- TSP: one route, visit locations
- VRP: multiple vehicles, capacities and/or time limits
- PDP: paired pickups and deliveries
Route to non-optimization handling
Do not route to cuOpt when the user is asking for:
- summaries
- analytics
- cleaning
- forecasting without optimization
- dashboards / charts
- explanation of data patterns
- SQL / filtering tasks
Ambiguity handling
If it is unclear whether the request is optimization or analytics, ask a concise clarifier such as:
- "Are you asking for a summary of the data, or the best decision under constraints?"
- "Do you want analytics from the data, or should I optimize a plan from it?"
If it is clearly optimization but unclear which family applies, ask the minimum clarifier needed.
Examples:
- "Do these quantities need to be whole numbers, or can fractional values be allowed?"
- "Is this about assigning routes/vehicles to locations, or just allocating quantities across products/resources?"
- "Is the objective linear, or does it include variance / squared penalties / interaction terms?"
Required output of this skill
Before handing off, produce an internal working conclusion with at least:
is_optimization: yes / noproblem_family: lp | milp | qp | routing | unknownwhy: short explanation grounded in the user’s wording and available datamissing_information: only the minimum unresolved items
Handoff guidance
- If
problem_family = lp | milp:- hand off to
numerical-optimization-formulation - then to
cuopt-numerical-optimization-api-python(orcuopt-numerical-optimization-api-clifor MPS inputs)
- hand off to
- If
problem_family = qp:- hand off to
numerical-optimization-formulation - then to
cuopt-numerical-optimization-api-python
- hand off to
- If
problem_family = routing:- hand off to
routing-formulation - then to
cuopt-routing-api-python
- hand off to
- If
is_optimization = yesand there is a meaningful signal that replayability, audit, export, or reuse may matter:- use
optimization-mode-routerbefore deep data interpretation or model construction
- use
- If
is_optimization = no:- do not invoke cuOpt just because the data could in theory be optimized
Examples
Example 1: product mix question
User says:
"I uploaded a product table and a capacity table. What’s the best production plan?"
Interpretation:
- this is optimization
- likely LP or MILP
- the user is asking for the best decision under resource constraints
Example 2: routing question
User says:
"I uploaded depots, customers, and a travel-time matrix. What’s the cheapest delivery plan?"
Interpretation:
- this is optimization
- specifically routing
- path construction and travel costs are central to the decision
Example 3: analytics question
User says:
"I uploaded sales.csv. Which product had the highest revenue last month?"
Interpretation:
- this is not optimization
- it is descriptive analysis over existing data
- do not route to cuOpt
Behavioral guardrails
- Do not label a request as optimization only because it contains numbers.
- Do not force a routing interpretation when the task is really allocation or assignment without path planning.
- Do not force LP/MILP when the question is clearly descriptive analytics.
- Prefer one short clarifying question over building the wrong model.
- When the user asks for the best decision under constraints, prefer optimization even if they do not use formal mathematical language.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

