Need help figuring out why Pinecone VectorIndexAutoRetriever is not working.
#### Background
I am working on a project using the LlamaIndex package integrating with Pinecone for my index. The project involves creating a VectorIndexAutoRetriever to set up a retriever similar to the example in
https://docs.llamaindex.ai/en/stable/examples/vector_stores/pinecone_auto_retriever/#### Problem Description
During the implementation, I encountered a
ValueError
stating that the vector store only supports exact match filters. Th error message is:
ValueError: Vector Store only supports exact match filters. Please use ExactMatchFilter or FilterOperator.EQ instead.
This error occurs when I attempt to use filters with operators other than exact matches (e.g.,
FilterOperator.LTE
).
#### Investigation
- Filter Setup: The LLM gives the right translation from query to metadata filter. The query is
Who are some founders that are 30 or below
MetadataFilters(filters=[MetadataFilter(key='age', value=30, operator=<FilterOperator.LTE: '<='>)], condition=<FilterCondition.AND: 'and'>)
Pinecone also supports this operation '<=' as described by the code below:
def _transform_pinecone_filter_operator(operator: str) -> str:
"""Translate standard metadata filter operator to Pinecone specific spec."""
print(f"DEBUG: The incoming operator is {operator} from the code")
...
elif operator == ">=":
return "$gte"
elif operator == "<=":
return "$lte"
...
GitHub link
What am I doing wrong? Is only exact match filtering supported? I can help add documentation but currently its pretty confusing to debug further for me.