-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat (reranking) : Support for reranking models #3764
base: main
Are you sure you want to change the base?
Conversation
@lgrammel, Could you please take a look at this PR when you have a chance? I would appreciate your feedback and guidance on this implementation. |
The implementation itself looks very good. However, at this point I'm not sure if we want to add reranking models to the AI SDK, because it increases the API surface that we need to manage, and I haven't gotten a chance to look at the different providers to understand what a common, stable API would look like. What major providers other than Cohere offer re-ranking? I'm very hesitant to add any abstraction that is based on a single provider implementation. |
Thank you for the feedback! Major providers offering reranking capabilities:
These providers share common patterns in their APIs:
|
Adding reranking support enhances the SDK's RAG capabilities:
This addition would give developers a complete, production-ready RAG solution within the SDK. |
This PR adds support for re-ranking models in the Vercel AI SDK provider. Currently, the SDK supports embedding models from providers like
Cohere
andMixedbread AI
for building Retrieval-Augmented Generation (RAG) systems. By integrating re-ranking models, developers can enhance these systems by improving the relevance of the retrieved results without additional manual setup or using another SDK.#3584