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
| Name | Type | Required | Description |
|---|---|---|---|
model | string | yes | Model spec. |
passages | string[] | yes | Candidate passages. |
query | string | yes | Query text. |
Returns
RankResponse.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinference.unsupported_operationinference.missing_modelinference.model_load_failedinference.local_runtime_failedinference.registry_corrupt
Invocation
- CLI:
strata inference rank - Wire type:
inference_rank