Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

community: Add configurable text key for indexing and the retriever in Pinecone Hybrid Search #29697

Merged

Conversation

e7217
Copy link
Contributor

@e7217 e7217 commented Feb 9, 2025

issue

In Langchain, the original content is generally stored under the text key. However, the PineconeHybridSearchRetriever searches the context field in the metadata and cannot change this key. To address this, I have modified the code to allow changing the key to something other than context.

In my opinion, following Langchain's conventions, the text key seems more appropriate than context. However, since I wasn't sure about the author's intent, I have left the default value as context.

Copy link

vercel bot commented Feb 9, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Feb 9, 2025 1:43pm

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. community Related to langchain-community Ɑ: retriever Related to retriever module labels Feb 9, 2025
@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Feb 10, 2025
@ccurme ccurme merged commit 60740c4 into langchain-ai:master Feb 10, 2025
19 checks passed
@e7217 e7217 deleted the feat/add-param-to-pineconeHBretriver branch February 10, 2025 14:43
bluearrow98 pushed a commit to bluearrow98/langchain that referenced this pull request Feb 13, 2025
…n Pinecone Hybrid Search (langchain-ai#29697)

**issue**

In Langchain, the original content is generally stored under the `text`
key. However, the `PineconeHybridSearchRetriever` searches the `context`
field in the metadata and cannot change this key. To address this, I
have modified the code to allow changing the key to something other than
context.

In my opinion, following Langchain's conventions, the `text` key seems
more appropriate than `context`. However, since I wasn't sure about the
author's intent, I have left the default value as `context`.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
community Related to langchain-community lgtm PR looks good. Use to confirm that a PR is ready for merging. Ɑ: retriever Related to retriever module size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants