Dive

Tool search

builtin__score_candidates

Scores candidate tools for a task from 0 to 1 and selects the best.

Scoring

  • With a decision model, scores are the probabilities of one choice question.
  • Large candidate lists are split into several choices, then the leaders compete in a final one.
  • Without a decision model, or if that call fails, candidates are ranked by keyword overlap.

Selection

  • selected holds candidates at or above threshold, topped up to floor and capped at limit.
Available toEffect
Any agent or plan stepRead-only

Input

candidatesobject[]required

Objects with name and description

chunk_sizeinteger

Most options per choice question, up to 255; larger sets are split into choices sent together, then a final choice among every candidate that reached the threshold. Default 250

floorinteger

Fewest candidates to select, taking the best below the threshold when needed; default 0

limitinteger

Most candidates to select

modelstring

The decision model role; default decider

querystringrequired

The task the candidates are scored against

questionstringrequired

The choice question; the task follows it

thresholdnumber

Minimum score to be selected; default 0.5

Output

modeenum<string>required

Available options: decision, keyword

scoredobject[]required
selectedobject[]required
- id: E1
  tool_name: builtin__score_candidates
  input:
    query: "{{input.query}}"
    candidates: "{{input.candidates}}"
    question: "{{input.question}}"