Issue with Metadata Filtering on Lambda for LangChain & Pinecone Integration #29539
Open
4 tasks done
Labels
Ɑ: vector store
Related to vector store module
Discussed in #29537
Originally posted by vaishnav-mk February 2, 2025
Checked other resources
Commit to Help
Example Code
Description
I'm using the langchain library in combination with Pinecone for vector retrieval and metadata filtering. The filtering works as expected locally, but when deploying the same code to AWS Lambda, it fails to retrieve the correct data based on the metadata, despite using the same
project_id
andtable_name
.What I’m doing:
I have a vector store retriever that is configured to filter results using metadata, specifically the table_name and project_id. Here’s an example of how I'm invoking the retriever:
What I expect:
The retriever should successfully fetch the project details based on the project_id and table_name metadata filters.
What happens instead:
Locally, everything works as expected, and I can retrieve project data. However, when deploying to Lambda and using the same project_id and table_name, the retrieval fails to return any data.
It works fine with all the other tools except for the project tool for some reason
![image](https://private-user-images.githubusercontent.com/84540554/408850191-8d898c34-ccd9-4979-8e1d-f495756bc262.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTgxODIsIm5iZiI6MTczOTA5Nzg4MiwicGF0aCI6Ii84NDU0MDU1NC80MDg4NTAxOTEtOGQ4OThjMzQtY2NkOS00OTc5LThlMWQtZjQ5NTc1NmJjMjYyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDEwNDQ0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU2ZTYwMmIzNDdhMzU3NDFkMTkwYTMwNGJkNjQzYWM3Zjk1YTJhMzM4NGYyNzE3ZmUwZTI5ZGY5ODhhY2ZlOTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.F1stf0ZXDBK2Y1gz7mXGgx4d5aHvr0i6EQMoJgUrEmQ)
Data stored in the vector store:
The metadata for the project is stored as follows:
System Info
The text was updated successfully, but these errors were encountered: