Docs menu · Reference

Scores each candidate passage against a query with a ranking model and returns one outcome per passage. Each item carries the passage’s original index and either a relevance score or a per-item error with a stable code and a redacted message, so callers can reorder passages by score while keeping them tied to their inputs. Ranking is a local-only operation: it requires a build with the local execution feature and a ranking-capable model.

Parameters

NameTypeRequiredDescription
modelstringyesModel spec.
passagesstring[]yesCandidate passages.
querystringyesQuery text.

Returns

RankResponse.

Errors

Invocation

  • CLI: strata inference rank
  • Wire type: inference_rank

agents: this page as markdown → /docs/reference/inference/rank.md