Encoding + Inserting
Encode and inserting with VecDB
Last updated
Was this helpful?
Encode and inserting with VecDB
Last updated
Was this helpful?
With your dataset currently stored locally, you will want to encode them and insert them into VecDB.
First - let us encode and retrieve a vector back. To encode an image or text, you can use our API below and play around with these yourself. If you are interested in understanding more about them, we recommend finishing the rest of the starter guide and then visiting the section on .
You have just encoded your first text/image using the API!
Now, let us encode and insert them into VecDB. To help with encoding and inserting them into VecDB, we write 2 simple helper functions:
Using these 2 functions, we then insert all of our COCO images into VecDB.
You can use the code as below (warning: this can take a while but that is okay! Since we are cloud-based, we can start searching immediately!)
Well done! You have inserted your first few documents into VecDB! How easy was that?
Now, read on to see how we perform searching in VecDB! (P.s. You do not have to finish inserting before you begin searching! In other words - the second you insert something into VecDB, it's immediately searchable seconds after!)