feat(pinecone): add hybrid/sparse search, reranking, and similarity threshold#6475
feat(pinecone): add hybrid/sparse search, reranking, and similarity threshold#6475yugborana wants to merge 1 commit into
Conversation
|
@HenryHengZJ @yau-wd @j-sanaa would like to request a review |
There was a problem hiding this comment.
Code Review
This pull request updates the Pinecone vector store component to support hybrid (dense + sparse) and sparse search types, along with optional reranking using the Pinecone Inference API. It introduces a custom PineconeHybridRetriever and a PineconeRerankCompressor to handle these new capabilities. Feedback on these changes highlights several critical issues: dense embeddings should always be generated during upsert to prevent dimension mismatch errors; document IDs should be deterministic to support idempotency; truthy checks for alpha and lambda must be corrected to handle explicit 0 values; pure sparse queries should use a zero-filled dense vector instead of an empty array; the Pinecone API key should be passed explicitly rather than extracted from private client properties; and global fetch should be replaced with axios for better compatibility and proxy support.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
solves #6265
Live Test -
https://github.com/user-attachments/assets/26106260-5799-438a-bb72-d087bf201ee7