Skip to content

Note dual/sensitivity support per problem type in formulation skill#1393

Merged
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
cafzal:claude/cuopt-duals-sensitivity-per-type
Jun 5, 2026
Merged

Note dual/sensitivity support per problem type in formulation skill#1393
rapids-bot[bot] merged 2 commits into
NVIDIA:mainfrom
cafzal:claude/cuopt-duals-sensitivity-per-type

Conversation

@cafzal
Copy link
Copy Markdown
Contributor

@cafzal cafzal commented Jun 5, 2026

Description

Adds a per-problem-type dual / sensitivity capability note to the concepts-only cuopt-numerical-optimization-formulation skill, so the agent guides users correctly on what cuOpt exposes after a solve:

  • LP — shadow prices (constraint duals) + reduced costs
  • MILP — none (integer optima are not continuous)
  • QP — shadow prices + reduced costs

Two edits: a Duals / sensitivity row in the LP/MILP/QP comparison table, and a short post-solve note giving the decision meaning — shadow price = where to invest (marginal objective gain from relaxing a binding constraint) and reduced cost = near-miss (how far a left-out option must improve before it enters the solution). As a concepts skill it states what's supported per type and what it means, and defers how to read them to the language-specific API skills (no API symbols inlined).

Why. Surfaced from real integration use — wiring solver-exact sensitivity/explainability into a downstream multi-objective decision layer. The formulation skill covered how to formulate but not which problem types yield sensitivity information, which is exactly what a user needs before relying on it (e.g. not expecting duals off a MILP).

The note also reflects the review feedback on #1355: a concepts skill carries no maturity ("beta") labels and no specific API symbols — both drift out of date, with no CI to catch the staleness.

Validation & gating. ci/utils/validate_skills.sh passes (skill structure, marketplace manifest, AGENTS.md references). The NVSkills-Eval pipeline — which also (re)generates BENCHMARK.md, the skill card, and the signature — is the gate and is pending: skills/** CI needs a maintainer and cannot be triggered from a fork branch.

Related.

Checklist

  • I am familiar with the Contributing Guidelines.
  • Testing
    • New or existing tests cover these changes
    • Added tests
    • Created an issue to follow-up
    • NA
  • Documentation
    • The documentation is up to date with these changes
    • Added new documentation
    • NA

Educate the agent on what cuOpt exposes per problem type: LP and QP (continuous)
have dual values (shadow prices) + reduced costs; MILP has none (integer optima
are not continuous). Adds a "Duals / sensitivity" row to the problem-type table
and a brief post-solve sensitivity note pointing to the lp_duals asset.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: cafzal <cameron.afzal@gmail.com>
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented Jun 5, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

…ecifics

The multi-objective skill PR (NVIDIA#1355) review asked to avoid maturity labels that
go stale ("no need to mention beta ... text could get stale by the next
release") and to keep concepts skills free of stale-prone specifics. This
formulation skill is concepts-only (no API code), so:

- drop the "(beta)" label on the QP duals cell (keep the capability statement)
- remove specific method/asset names (lp_duals / get_dual_solution /
  get_reduced_cost / DualValue / ReducedCost); point to the language-specific
  API skills instead

Keeps the per-type capability and the decision-language definitions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: cafzal <cameron.afzal@gmail.com>
@cafzal cafzal marked this pull request as ready for review June 5, 2026 04:06
@cafzal cafzal requested a review from a team as a code owner June 5, 2026 04:06
@cafzal cafzal requested a review from tmckayus June 5, 2026 04:06
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds educational documentation content to the "Identifying problem type" section, introducing a new comparison row for dual information and sensitivity analysis capabilities. The changes clarify that LP and QP support post-solve sensitivity metrics (dual values, shadow prices, reduced costs) while MILP formulations do not expose dual values.

Changes

Problem Type Identification Documentation

Layer / File(s) Summary
Duals and sensitivity analysis comparison
skills/cuopt-numerical-optimization-formulation/SKILL.md
Added new table row distinguishing LP, MILP, and QP dual availability, and expanded explanation of post-solve sensitivity analysis covering dual values, shadow prices, and reduced costs for LP/QP while explicitly stating MILP has no duals.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

non-breaking, improvement

Suggested reviewers

  • rgsl888prabhu
  • mlubin
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Note dual/sensitivity support per problem type in formulation skill' directly and clearly describes the main change—documenting per-problem-type dual and sensitivity capabilities in the formulation skill.
Description check ✅ Passed The description thoroughly explains the changes, motivation, and validation approach, covering what was added (dual/sensitivity rows and post-solve notes), why it matters (integration use case), and how it aligns with concepts-skill principles.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
skills/cuopt-numerical-optimization-formulation/SKILL.md (1)

1-40: Ensure merge gates for skills/ changes are satisfied.

Since this PR changes skills/**, please make sure a maintainer runs /nvskills-ci and the signature commit remains in the PR, and confirm all commits are DCO signed (git commit -s) before merge. As per coding guidelines, “PRs that change content under skills/ must be validated by NVSkills CI with maintainer /nvskills-ci comment before merge” and “Sign off all commits with DCO sign-off using git commit -s.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@skills/cuopt-numerical-optimization-formulation/SKILL.md` around lines 1 -
40, This PR modifies content under skills/, so ensure a maintainer runs the
NVSkills CI validation by adding the "/nvskills-ci" comment and confirm the
signature commit remains in the PR; also verify every commit has a DCO sign-off
(use git commit -s for any missing sign-offs) before merging so the skill change
(SKILL.md) meets the merge gates.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@skills/cuopt-numerical-optimization-formulation/SKILL.md`:
- Around line 1-40: This PR modifies content under skills/, so ensure a
maintainer runs the NVSkills CI validation by adding the "/nvskills-ci" comment
and confirm the signature commit remains in the PR; also verify every commit has
a DCO sign-off (use git commit -s for any missing sign-offs) before merging so
the skill change (SKILL.md) meets the merge gates.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1ea475be-1cda-4813-8328-a5465f2a9983

📥 Commits

Reviewing files that changed from the base of the PR and between 34465b2 and a401504.

📒 Files selected for processing (1)
  • skills/cuopt-numerical-optimization-formulation/SKILL.md

@cafzal
Copy link
Copy Markdown
Contributor Author

cafzal commented Jun 5, 2026

@rgsl888prabhu For visibility: Here's a minor skill addition to clarify dual/sensitivity support.

@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

/ok to test a401504

@rgsl888prabhu rgsl888prabhu added non-breaking Introduces a non-breaking change improvement Improves an existing functionality labels Jun 5, 2026
@rgsl888prabhu
Copy link
Copy Markdown
Collaborator

/merge

@rapids-bot rapids-bot Bot merged commit 2384454 into NVIDIA:main Jun 5, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants