Vector Search setup

Prepare your embeddings

To use Vector Search, you need to have your embeddings ready. If you have already created your embeddings, you can skip to Choose an endpoint.

To create your embeddings, do the following:

  1. Prepare your data: This involves cleaning and preprocessing your data to ensure that it is in a format that can be used by the embedding model.
  2. Choose an embedding model: There are many different external embedding models available, each with its own strengths and weaknesses. You can use ready-to-use embeddings APIs, or you can opt for custom models for embedding generation. Use the option that is best for your use case.
    • Ready-to-use: Choose this option if you want to semantically match text, or texts with an image, by the relevance of the text/image alone. You don't need to train or tune anything because your use-case is standard. The Vertex AI text-embeddings API is a great option.
    • Custom model for embeddings: Use a custom model if your semantic matching tasks need to be based on your own data or specific use case.
  3. Train the embedding model if you use a custom model: If you choose to use a custom embeddings model (tuning), you need to train it on your data. This can be a time-consuming process that depends on the size and complexity of your data. If you use a pretrained model from the Model Garden, then you can skip this step.
  4. Generate embeddings: After the model is trained, you can use it to generate embeddings for your data. After you have your embeddings, you can add them to Vector Search.

Choose an endpoint

You can deploy your query index to one of the following:

If you want to allow private consumption of services across Virtual Private Cloud (VPC) networks that belong to different groups, teams, projects, or organizations, then deploy your index to a VPC and enable Private Service Connect. Otherwise, you can deploy your index to a public endpoint.

Before you call the Vector Search index from a client that's running in your VPC, you need to configure a VPC network peering connection. You configure a VPC network peering connection only one time for each Google Cloud project. For more information, see Create a peering configuration.

What's next

After you've generated your embeddings and decided where to deploy your index, the next step is to configure your index.