agentleFS
NVIDIAKnown publisherNVIDIA/cuopt-examples/cuopt_on_nemoclaw/openclaw-skills/optimization-intent-router/SKILL.md

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.

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
  1. Distinctive:

    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:

    line 17
  2. Distinctive:

    Instead they ask questions like:

    line 34
  3. Distinctive:

    Use structure, not exact keywords:

    line 50
  4. Distinctive:

    NemoClaw sandbox: When constructive + constraint data →

    line 59
  5. Very specific:

    cuopt-sandbox gates immediately: before any schedule, roster, assignment, or route output — regardless of whether the user said minimize …

    line 60
  6. Distinctive:

    If the user is only asking for:

    line 69
  7. Very specific:

    When weaker signals appear, inspect whether there are real constraints and decisions.

    line 97
  8. Distinctive:

    If the user is maximizing a quadratic expression, note that the modeling path may require reformulation as a minimization of the negated …

    line 146
  9. Distinctive:

    Use routing when the decisions are fundamentally about movement through locations.

    line 149
  10. Distinctive:

    Do not route to cuOpt when the user is asking for:

    line 169
  11. Distinctive:

    If it is unclear whether the request is optimization or analytics, ask a concise clarifier such as:

    line 180
  12. Distinctive:

    If it is clearly optimization but unclear which family applies, ask the minimum clarifier needed.

    line 185
  13. Distinctive:

    Before handing off, produce an internal working conclusion with at least:

    line 194
  14. Very specific:

    If is_optimization = yes and there is a meaningful signal that replayability, audit, export, or reuse may matter:

    line 215
  15. Very specific:

    use optimization-mode-router before deep data interpretation or model construction

    line 216
  16. Distinctive:

    do not invoke cuOpt just because the data could in theory be optimized

    line 219
  17. Distinctive:

    do not route to cuOpt

    line 248
  18. Distinctive:

    Do not label a request as optimization only because it contains numbers.

    line 252
  19. Distinctive:

    Do not force a routing interpretation when the task is really allocation or assignment without path planning.

    line 253
  20. Distinctive:

    Do not force LP/MILP when the question is clearly descriptive analytics.

    line 254
  21. Distinctive:

    Prefer one short clarifying question over building the wrong model.

    line 255
  22. Distinctive:

    When the user asks for the best decision under constraints, prefer optimization even if they do not use formal mathematical language.

    line 256

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

SignalRoute to cuOpt?
Constructive + constraint tables (uploaded or referenced)Yes — family TBD (MILP/LP/QP/routing)
Minimize / maximize / best / optimal / least costYes
Feasible / valid / make it work / respect rules (constructive)Yes — feasibility = hard constraints
Summarize / chart / filter / explain data onlyNo

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 / no
  • problem_family: lp | milp | qp | routing | unknown
  • why: short explanation grounded in the user’s wording and available data
  • missing_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 (or cuopt-numerical-optimization-api-cli for MPS inputs)
  • If problem_family = qp:
    • hand off to numerical-optimization-formulation
    • then to cuopt-numerical-optimization-api-python
  • If problem_family = routing:
    • hand off to routing-formulation
    • then to cuopt-routing-api-python
  • If is_optimization = yes and there is a meaningful signal that replayability, audit, export, or reuse may matter:
    • use optimization-mode-router before deep data interpretation or model construction
  • 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.