Table of Contents

Class VllmReranker

Namespace
Mythosia.AI.Rag.Reranking
Assembly
Mythosia.AI.Rag.dll
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

httpClient HttpClient
model string
baseUrl string
apiKey string

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

query string

The original text query.

results IReadOnlyList<VectorSearchResult>

The initial retrieval results to re-rank.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<IReadOnlyList<VectorSearchResult>>

All results re-scored and ordered by relevance (descending).