Querying with filtering on metadata - performance

Hi. Would filtering on metadata when doing a query makes the response time faster (as there are less data) or does it actually make it slower?

Hi @reyjans,

The answer, as is usual, is “it depends.” In most cases the response time will be a bit faster for exactly why you listed, the query itself is being run on a smaller subset of the whole corpus. But there is a performance cost to performing the metadata query itself, and if the resulting subset isn’t small enough to make a difference in vector query time you might see a slight increase in latency.

We recommend testing with your data to be sure.

1 Like