generative-ai icon indicating copy to clipboard operation
generative-ai copied to clipboard

[Bug]: No 'batch_root' folder in tutorial notebook of vector search index

Open BanJeoker opened this issue 1 year ago • 2 comments

File Name

generative-ai/blob/main/embeddings/intro-textemb-vectorsearch.ipynb

What happened?

In this sentence, Then, create a new Cloud Storage bucket and copy the file to it. BUCKET_URI = f"gs://{PROJECT_ID}-embvs-tutorial-{UID}" ! gsutil mb -l $LOCATION -p {PROJECT_ID} {BUCKET_URI} ! gsutil cp questions.json {BUCKET_URI}

You need to create a 'batch_root' folder in the bucket you just created, otherwise the index created will not use that json file, it will be an empty index.

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

BanJeoker avatar Nov 14 '24 15:11 BanJeoker

Hi @BanJeoker , did you actually ran the notebook and saw an empty index created? I've been creating index without the batch_root folder for many times, and haven't seen any issues..

kazunori279 avatar Nov 15 '24 05:11 kazunori279

@kazunori279 yes I ran the notebook, the index can be created without the batch_root folder, however, in that case, the index will have no dense count, a query will return empty list back. Also, isn't creating the batch_root folder emphasized in the official documentation here

https://cloud.google.com/vertex-ai/docs/vector-search/setup/format-st Screenshot 2024-11-15 at 6 40 41 AM

Thanks

BanJeoker avatar Nov 15 '24 11:11 BanJeoker

Hi @BanJeoker , I just went through the notebook from the start, and got a proper result:

Screenshot 2024-11-19 at 16 32 59

So the use of the batch_root folder may not be the cause why you are getting an empty result. But agree, it's better to add the use of batch_root folder to this sample to be consistent with the document.

kazunori279 avatar Nov 19 '24 07:11 kazunori279

thank you Kaz

BanJeoker avatar Nov 19 '24 13:11 BanJeoker