rerank abstract method

Future<BackendRerankingOutput> rerank(
  1. int contextHandle,
  2. String query,
  3. List<String> documents
)

Scores complete query/document pairs in input order, preserving all classes.

Preflight the entire batch before inference, never truncate or return partial results, and use LlamaBackend.cancelGeneration for cancellation. Unsupported combinations throw LlamaUnsupportedException; overflow, cancellation and execution failures throw LlamaInferenceException.

Implementation

Future<BackendRerankingOutput> rerank(
  int contextHandle,
  String query,
  List<String> documents,
);