Class VllmReranker
public class VllmReranker : IReranker
- Inheritance
-
VllmReranker
- Implements
- Inherited Members
Constructors
VllmReranker(HttpClient?, string, string, string?)
public VllmReranker(HttpClient? httpClient = null, string model = "Qwen/Qwen3-Reranker-0.6B", string baseUrl = "http://localhost:8003", string? apiKey = null)
Parameters
httpClientHttpClientmodelstringbaseUrlstringapiKeystring
Methods
RerankAsync(string, IReadOnlyList<VectorSearchResult>, CancellationToken)
Re-ranks the given search results based on their relevance to the query. Returns all results with updated scores, ordered by relevance (descending).
public Task<IReadOnlyList<VectorSearchResult>> RerankAsync(string query, IReadOnlyList<VectorSearchResult> results, CancellationToken cancellationToken = default)
Parameters
querystringThe original text query.
resultsIReadOnlyList<VectorSearchResult>The initial retrieval results to re-rank.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<IReadOnlyList<VectorSearchResult>>
All results re-scored and ordered by relevance (descending).