langchain-ai / langchain-google

MIT License
78 stars 81 forks source link

Add langchain component for Vertex Standalone Ranking API #167

Closed Abhishekbhagwat closed 2 months ago

Abhishekbhagwat commented 2 months ago

Vertex DIY RAG APIs helps to build complex RAG systems and provide more granular control, and are suited for custom use cases. The ranking API takes in a list of documents and reranks those documents based on how relevant the documents are to a given query. Compared to embeddings that look purely at the semantic similarity of a document and a query, the ranking API can give you a more precise score for how well a document answers a given query. Reference : https://cloud.google.com/generative-ai-app-builder/docs/ranking

We implement this similar to other ranking APIs that langchain already integrates with - like Cohere Ranker