optimization-intent-router

작성자: nvidia

데이터 기반 요청이 LP, MILP, QP, 라우팅 또는 비최적화 분석인지 분류합니다.

npx skills add https://github.com/nvidia/cuopt-examples --skill optimization-intent-router

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.

nvidia의 다른 스킬

accelerated-computing-cudf
nvidia
공식 NVIDIA 작성 NVIDIA cuDF GPU 데이터프레임, pandas 가속, dask-cuDF, ETL, 조인, groupby, CSV/Parquet I/O, nullable 의미론 등에 대한 안내
accessibility
nvidia
정적 분석, 런타임 테스트, ARIA 패턴, 키보드 탐색, 색상 대비를 아우르는 통합 접근성 감사 워크플로입니다. 이 스킬을 사용하세요…
accessing-mlflow
nvidia
MLflow에 저장된 평가 결과를 조회하고 탐색합니다. 사용자가 호출 ID로 실행을 조회하거나, 모델 간 메트릭을 비교하거나, 아티팩트를 가져오려 할 때 사용하세요.
add-binding-feature
nvidia
핵심 런타임과 영향을 받는 모든 바인딩에서 공용 NeMo Relay API 표면을 추가하거나 변경합니다.
add-middleware
nvidia
NeMo Relay 미들웨어 파이프라인에 새로운 가드레일 또는 인터셉트 유형을 추가합니다.
aicr-analyzing-snapshots
nvidia
AICR 스냅샷 YAML 파일을 분석하거나, 클러스터 상태를 검토하거나, 공급자 특성을 비교하거나, GPU/네트워크 토폴로지 인사이트를 추출할 때 사용합니다...
aicr-auditing-docs
nvidia
AICR의 Markdown 문서를 검토할 때 중복, 표류, 비대, 공백을 확인하여 프로젝트가 발전함에 따라 문서의 가치를 높게 유지하기 위해 사용합니다. "감사…"로 시작하는 트리거에 반응합니다.
aicr-creating-guided-demos
nvidia
대화형 안내 데모 스크립트(demos/*.sh)를 라이브 또는 자기 주도 방식으로 Frame → Tell → Show → Close 패턴에 따라 구조화한다. "데모 스크립트", "안내…"와 같은 표현에 반응한다.