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
Please provide as much details as possible, this will help us to deliver a fix as soon as possible.
Thank you!
Describe the bug
A clear and concise description of what the bug is.
PineconeEmbeddingStore, the Pinecone implementation of Embedding store, is a TextSegment embeddings store. Since the latter has a Metadata attribute, it stands to reason that if a client called the add method using TextSegments with metadata, that the metadata would be uploaded to Pinecone. The actual behavior is that the Metadata gets dropped.
Log and Stack trace
Please provide a log and a stack trace (with exception), if applicable.
N/A
To Reproduce
Please provide a relevant code snippets to reproduce this bug.
Instantiate a Pinecone Client, index, and an embedding model
Create a TextSegment with non-trivial metadata, for example
(excuse my Java, I am a Clojure programmer)
Metadatam = newMetadata(Map.of(
"a", "b",
"c", "d"
));
TextSegmentt = TextSegment.from("I Am a text segment, m)
Create embeddings for this text (although you can actually pass in a random vector for this repro) and invoke .add with the segment to upload to Pinecone
The metadata will not make it to Pinecone
Expected behavior
A clear and concise description of what you expected to happen.
Expecting the metadata to appear in the Pinecone console/be retrieved with Query requests
Please complete the following information:
LangChain4j version: e.g. 0.24.0
Java version:o openjdk version "21.0.1" 2023-10-17
Spring Boot version (if applicable): e.g. 2.7.14
Additional context
Add any other context about the problem here.
This appears to be just omitted from the interaction with Pinecone:
Created PR #955 for that issue.
Please check my comments in the PR itself 🙏
Btw - If we manage to get this merged soon - I have already done the upgrade from pinecone-client 0.6.0 to 1.0.0.
I will create separate PR once this one gets merged
Please provide as much details as possible, this will help us to deliver a fix as soon as possible.
Thank you!
Describe the bug
A clear and concise description of what the bug is.
PineconeEmbeddingStore
, the Pinecone implementation ofEmbedding
store, is aTextSegment
embeddings store. Since the latter has aMetadata
attribute, it stands to reason that if a client called theadd
method using TextSegments with metadata, that the metadata would be uploaded to Pinecone. The actual behavior is that the Metadata gets dropped.Log and Stack trace
Please provide a log and a stack trace (with exception), if applicable.
N/A
To Reproduce
Please provide a relevant code snippets to reproduce this bug.
(excuse my Java, I am a Clojure programmer)
Expected behavior
A clear and concise description of what you expected to happen.
Expecting the metadata to appear in the Pinecone console/be retrieved with Query requests
Please complete the following information:
Additional context
Add any other context about the problem here.
This appears to be just omitted from the interaction with Pinecone:
langchain4j/langchain4j-pinecone/src/main/java/dev/langchain4j/store/embedding/pinecone/PineconeEmbeddingStore.java
Line 135 in e2ba220
I may try to make a pull request. In the meantime I will have to write my own Pinecone integration with their SDK.
The text was updated successfully, but these errors were encountered: