Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to add metadata to an Index datapoint in vertex ai

I have been having problems integrating vertex ai matching engine for embedding similarity search using the google cloud aiplatform python sdk, specifically when adding metadata to an index datapoint via `

google.cloud.aiplatform_v1.types.
IndexDatapoint
` so i checked the docs and i saw there was no metadata field, seems matching engine indexing only supports indexing embeddings with restrictions which would not work in my usecase because i need each embedding to have specific metadata that would be relevant after the similarity search.
I just want to be sure if i'm not missing anything or i should find other  vector database services to use?
1 2 812
2 REPLIES 2

Hi @precious112,

Welcome to Google Cloud Community!

You've identified a key limitation of Vertex AI Matching Engine: it doesn't directly support storing and querying metadata associated with embeddings in its index datapoints. Additionally, you are right that the google.cloud.aiplatform_v1.types.IndexDatapoint message does not include a metadata field.

You are not missing anything. This is a known limitation and a common challenge for users who need to filter or refine search results based on metadata. Matching Engine is primarily optimized for speed and scalability in finding nearest neighbors based on vector embeddings. Its focus is on the raw vector data itself.

You can also read the following documentation for more details:

Vertex AI Matching Engine Documentation:

  • IndexDatapoint API Reference: This documentation shows the structure of IndexDatapoint in the Python client library for the Vertex AI API. 
  • Matching Engine Overview: This gives you a general overview of Matching Engine's purpose and capabilities, emphasizing its focus on speed and scalability for vector search.

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.

but why not google include that , this is a very important feature ......!