GoogleCloudPlatform / GoogleCloudPlatform/generative-ai

[Question]: filtering by metadata, what is first?

Open
#1,689 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
17.7k
Forks
4.5k
Avg merge
12h 38m
Merged PRs (30d)
42

Description

### File Name

vertexAI and Vector Search

### What happened?

This is just a question but is crucial for time inference and efficiency in my company.

We're using Vector Search and filtering to retrieve the rigth samples that we need. But, for efficiency and inference speed, I would like to know how is the retriever working with filtering under the hood.

(1) Is it first doing the similarity search and then filtering the outputs by the metadata that we chose? Or (2) it's first doing the filtering and then searching by similarity just for that metadata?

What I mean with this is; in case (1) it wont do the search directly in all the chunks related to the metadata that I want (let's call it a user)

Sorry if this question should not be here! But I'm looking for answers in all the internet and I cannot find it

### Relevant log output

```shell

```

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.