vector_store_filtersTier 1 · 70% confidence

ai-agents-vector-store-filters-using-metadatafilters-with-filtercondition-or-and--5417f635

agent: ai_agents

When does this happen?

IF Using MetadataFilters with FilterCondition.OR and multiple ExactMatchFilter on the same metadata key returns 'Empty response' and ignores query formatting.

How others solved it

THEN Subclass SimpleVectorStore to override its query method so that multiple filters on the same key are combined as OR instead of AND, or switch to a vector store that natively supports the IN filter operator to achieve the same effect.

class MySimpleVectorStore(SimpleVectorStore):
    def query(self, query_embedding, similarity_top_k, node_ids=None, doc_ids=None, filters=None, **kwargs):
        # Custom logic: group filters by key, apply OR within same key
        ...  # See full hack in issue comment

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics