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

How to delete a data point in Vertex AI vector search

https://cloud.google.com/vertex-ai/docs/vector-search/setup/format-structure?hl=en
According to the documentation, I store the IDs to be deleted in `delete/delete_file.txt`.

The contents of delete_file.txt are as follows:
12345
23456

After updating the index, the data still exists. Does anyone know how to resolve this?

1 2 1,449
2 REPLIES 2

Hello,

Thank you for contacting the Google Cloud Community.

There seems to be a discrepancy between the documentation and actual behavior regarding deleting data using delete/delete_file.txt in Vertex AI Vector Search. Here are some possible explanations and solutions:

1. Verify and Adjust File Format:

  • Open delete/delete_file.txt in a text editor.
  • Ensure each line contains only the ID of a vector to be deleted (e.g., one ID per line).
  • Remove any leading or trailing spaces or characters.
  • Save the file with this corrected format.

2. Separate Update and Deletion:

  • Update your index with the new data without including the delete/delete_file.txt file.
  • After a successful update, trigger a separate process to delete specific vectors using their IDs. You can achieve this through the Vertex AI Client Libraries or a custom script.
  • The Client Libraries offer functionalities for deleting individual vectors using their IDs. Refer to the documentation for specific methods.


Regards,
Jai Ade

I ultimately chose to use a streaming index to enable real-time addition and deletion of indexed data.