Rank candidates on weighted dimensions
rank_candidatesGrade each candidate on several weighted dimensions to get a numeric ranking. Use when a choice depends on multiple factors such as relevance, risk, and effort.
Instructions
Rank 2-30 candidates (search results, candidate plans, next actions, models to route to) by grading each one on several described dimensions and combining the grades with your weights. Returns numbers only, never prose.
WHEN TO USE: you have a shortlist and the better choice depends on more than one factor (relevance and freshness; expected benefit, risk, and effort). For picking one option on a single question, use judge with a choice question instead.
WHAT TO PASS: "context" holds what every candidate is judged against (the query, the goal, constraints). Each candidate is graded in its own request, seeing only "context" and its own "content" as candidate, so grades are comparable and a candidate is never judged relative to the others. Dimensions must be independent; split "good and cheap" into two dimensions.
HOW TO READ THE RESULT:
"ranking" is sorted best first. "composite" is the weighted mean of the normalized dimension scores, from 0 to 1.
Each dimension reports "score" (probability-weighted level, can fall between levels), "normalized" (score divided by the top level), "confidence", and "certainty". The raw scores are returned so you can re-weight without calling again.
"top_margin" is the composite gap between first and second place. "top_tied" is true when that gap is at or below "tie_margin": the ranking does not separate the two, so do not trust their order. Break the tie on something else or treat both as equal.
Read the winner's "composite" as well as its rank. When every candidate is weak, the top one still has a low composite, and the right move may be to look for better candidates.
"needs_escalation" lists each candidate/dimension pair graded with low certainty. That usually means the candidate's content does not say enough about that dimension, or the levels overlap. If a flagged pair involves a top candidate, get the missing information or verify before acting on the ranking.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | Yes | Named fields shared by every candidate: the query or goal, constraints, relevant facts. | |
| candidates | Yes | ||
| dimensions | Yes | ||
| thresholds | No | Override the uncertainty thresholds for this call. Tighten them (e.g. confidence_high 0.9, noul_band [0.1, 0.9]) when acting on a wrong answer would be costly or irreversible. | |
| tie_margin | No | First and second place count as tied when their composite gap is at or below this. Default 0.05. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| usage | Yes | ||
| ranking | Yes | ||
| top_tied | Yes | ||
| top_margin | Yes | ||
| needs_escalation | Yes |