IRerankingService
Namespace: Wisej.AI.Services
Assembly: Wisej.AI
Represents a service for reranking documents based on a given query.
- C#
- VB.NET
public interface IRerankingService
Public Interface IRerankingService
Properties
TopN
Int32: Gets or sets the maximum number of documents to return in the reranked response. If set to 0 it will return all the documents in the input.
Methods
RerankAsync(query, chunks)
Asynchronously reranks the provided chunks based on the specified query.
| Parameter | Type | Description |
|---|---|---|
| query | String | The query used to rerank the chunks. |
| chunks | String[] | The array of text inputs to be reranked. |
Returns: Task<String[]>. A task that represents the asynchronous operation. The task result contains an array of reranked text inputs.
Implemented By
| Name | Description |
|---|---|
| DefaultRerankingService | Provides a default implementation of the IRerankingService for reranking documents using a specified endpoint to an AI provider. It uses LLM models to rerank and optionally optimize the submitted inputs. |
| LocalAIRerankingService | Represents a service for reranking text inputs using the LocalAI API. |
| PineconeRerankingService | Represents a service for reranking text inputs using the Pinecone API. |