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의 다른 스킬

compileiq-debug
nvidia
무언가 잘못되었을 때 사용: Search()가 멈추거나, 모든 평가가 INVALID_SCORE를 반환하거나, 점수가 개선되지 않거나, 모든 설정이 동일한 숫자를 반환하거나, ptxas 오류 등이 발생할 때
create-github-pr
nvidia
gh CLI를 사용하여 GitHub 풀 리퀘스트를 생성합니다. 사용자가 새 PR을 만들거나, 코드 리뷰를 제출하거나, 풀 리퀘스트를 열고자 할 때 사용합니다. 트리거 키워드 -…
nemoclaw-maintainer-cross-issue-sweep
nvidia
다른 열린 이슈들을 스캔하여 주어진 PR이 함께 수정하거나 실수로 망가뜨릴 수 있는 이슈를 찾습니다. 인접 수정 기회와 모순 위험을 file:line…과 함께 출력합니다.
fhir-basics
nvidia
에이전트에게 FHIR R4 API의 작동 방식, 사용 가능한 리소스, 검색 매개변수를 사용한 쿼리 방법, 모든 응답 형식을 올바르게 파싱하는 방법을 가르칩니다…
compileiq-validate-result
nvidia
검색이 완료된 후, 속도 향상을 청구하거나 ACF를 발송하기 전에 사용합니다. dump_results CSV를 로드하고, 상위 K개 후보(단일 목표)를 추출합니다…
changelog-audit
nvidia
릴리스 전에 Warp CHANGELOG.md를 감사합니다: 누락된 항목 복구, 사용자 영향별 정렬, 항목 언어 다듬기, 줄 바꿈, (릴리스 브랜치 모드) 비교 업데이트…
maintain-dynamic-plugins
nvidia
NeMo Relay 동적 플러그인 로더, 매니페스트, Rust 네이티브 SDK, gRPC 워커 프로토콜, Python 워커 SDK, 문서, 테스트 및 릴리스 워크플로 커버리지를 유지 관리합니다.
dgx-diagnose
nvidia
일반적인 DGX Station GB300 문제 진단 — CUDA 충돌, 잘못된 GPU 타겟팅, vLLM/SGLang 컨테이너 버그, MIG 상태 문제, NVLink/Fabric Manager 오류,…