Pinecone auto converting string to datetime.dates when stored as 'text' metadata

Pinecone is for some odd reason converting my string ID in the ‘text’ metadata field to a datetime stamp automatically. Has anybody run into this issue?

{‘id’: ‘21191121’,
‘metadata’: {‘about’: ‘7’,
‘affect’: [‘55619’],
‘chunk’: 0.0,
‘context’: ‘20’,
‘date’: 1687198555.0,
‘feeds’: ‘60946’,
‘geography’: [‘259’],
‘keyword’: [‘25361’, ‘60082’, ‘3744037’],
‘meta_id’: ‘32621’,
‘organization’: [‘10102’],
‘priority’: ‘5272’,
‘text’: datetime.date(2119, 11, 21)},
‘score’: 0.857690334,
‘values’: },
{‘id’: ‘21186099’,
‘metadata’: {‘about’: ‘7’,
‘affect’: [‘55619’],
‘chunk’: 0.0,
‘context’: ‘20’,
‘date’: 1686341342.0,
‘feeds’: ‘60947’,
‘geography’: [‘259’],
‘keyword’: [‘25361’, ‘46601’, ‘3744037’],
‘meta_id’: ‘32621’,
‘organization’: [‘1502’, ‘10102’],
‘priority’: ‘5272’,
‘text’: ‘21186099’},
‘score’: 0.847715676,
‘values’: },

Hi @mason.chambers,

Thanks for your question, and I’m sorry you’re encountering this issue.

That is odd - I wonder if there’s an edge case where our stack gets too aggressive in type inference.

Would you be willing to share the application code you’re running to perform the upsert to Pinecone?

That would help us further diagnose the issue and ensure we have enough information to investigate the bug further.

By the way, are you still encountering this behavior?

Just wanna mentioned that we have encountered the same issue and it’s super inconvenient. Would be nice if this can be fixed from Pinecone side.

1 Like

This is actually an issue with langchain you can avoid the issue by fetching data with a pinecone query and using a GRPC Index

1 Like