You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Effect’s AI modules currently have an EmbeddingModel module for generating embeddings. A common use case for these embeddings is to use some sort of vector database, storing them and then querying them. A reranker model, by contrast, is typically given a query (as a string) and a list of candidate documents to rank (as a list of strings), and scores them against the query.
Several of the providers Effect already supports offer reranker models:
What is the feature you are proposing to solve the problem?
A RerankerModel module, analogous to LanguageModel, EmbeddingModel, and DecisionModel.
The input to a reranker model is typically a query (a string) and a list of documents (a string[]). The order of the documents in the list matters for some providers because they either return the index of the document.
The output is typically a list of the documents and their scores. As far as I know, most providers return the score as a float in the range [0, 1], but Cloudflare seems to leave that for the caller.
Activity