inference

rank

Rank passages against a query.

strata inference rank

wire inference_rank

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.

To see the complete help for this command, run:

strata inference rank --help

Parameters

NameTypeRequiredDescription
modelstringyesModel spec.
requestRankRequestyesRanking request.

Returns

RankResponse

  • dataRankResponse
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

CodeRetryCommit outcome
failed_precondition.engine.runtime_closednevernot_started
not_found.engine.branchnevernot_applicable
inference.unsupported_operationnevernot_applicable
inference.missing_modelafter_state_changenot_applicable
inference.model_load_failedafter_state_changenot_applicable
inference.local_runtime_failedunknownnot_applicable
inference.registry_corruptnevernot_applicable
← All 11 Inference commands

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