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:
- 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.
- 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.
- 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.
- 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:
Public endpoint: If you deploy to a public endpoint, then you need to only make sure your vector is formatted correctly. For more information, see Input data format and structure.
VPC: If you want to use a VPC, you must first set up networking. See Set up a VPC Network Peering connection.
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.
- Learn how to configure Input data format and structure
- See Vector Search notebook tutorials in the Tutorials overview
- Learn how to Manage indexes