# The presence of metadata affects vector retrieval negatively

**URL:** <https://community.pinecone.io/t/the-presence-of-metadata-affects-vector-retrieval-negatively/1906>\
**Category:** Support\
**Created:** [May 18, 2023, 12:54pm UTC](https://community.pinecone.io/t/the-presence-of-metadata-affects-vector-retrieval-negatively/1906 "2023-05-18T12:54:34Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![zigguratt](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/zigguratt/32/1510_2.png) [@zigguratt](https://community.pinecone.io/u/zigguratt)\
**Post date:** [October 19, 2023, 3:58pm UTC](https://community.pinecone.io/t/the-presence-of-metadata-affects-vector-retrieval-negatively/1906/21 "2023-10-19T15:58:41Z")

</div>

Just make sure that you don’t send the actual object to the LangChain Pinecone vector store code. Do this before you send the metadata object:

```auto
copy.deepcopy(metadata)

```

---

<div class="post-metadata">

**Author:** ![LarryStewart2022](https://sea2.discourse-cdn.com/flex020/user_avatar/community.pinecone.io/larrystewart2022/32/665_2.png) [@LarryStewart2022](https://community.pinecone.io/u/LarryStewart2022)\
**Post date:** [October 24, 2023, 3:01pm UTC](https://community.pinecone.io/t/the-presence-of-metadata-affects-vector-retrieval-negatively/1906/22 "2023-10-24T15:01:04Z")

</div>

or just use, import pinecone and stay away from the LangChain.

```auto
batch_size = 90 
    
    for filename, embedding_metadata_pairs in data_dict.items():
        
        for i in range(0, len(embedding_metadata_pairs), batch_size):
                      
            batch = embedding_metadata_pairs[i:i + batch_size]
            
            batch_data = [(str(uuid.uuid4()), pair["embedding"], pair["metadata"]) for pair in batch]
           
            pinecone_index.upsert(batch_data, BotNameSpace) # Adjusted line to match Pinecone's upsert method signature

```

[Previous page](https://community.pinecone.io/t/the-presence-of-metadata-affects-vector-retrieval-negatively/1906.md?page=1)
