I have records with a field ‘content’, which is a large text body. I want to divide the body into chunks, and vectorize each chunk. However, each chunk should link to the same record.
Basically, I want multiple vectors for the same record on one search index.
How can I do this if I’m manually providing in embeddings myself? I saw multiple named vectors but I want it all on the same index. Plus, I already created the collection, so I didn’t want to do a whole migration / transfer.
One way I can think of is to just create multiple records that store a reference id to the original record but this seems clunky.
Weaviate supports multiple vector embeddings per object through “named vectors” which you already put your hand on. With named vectors, you can store multiple vector embeddings for a single object and search using any of these vector spaces.
However, there are two important limitations to note:
Named vectors must be defined at collection creation time - you cannot add them to an existing collection
Each named vector is independent and has its own index
As you mentioned, you’ve already created your collection, so this would require a migration to a new collection with the proper configuration.
Best regards,
Mohamed Shahin
Weaviate Support Engineer
(Ireland, GMT/UTC timezone)
Oh wow Ref2Vec seems interesting, but it would require a migration still right… I think the chunking + separate record + with a metadata property foreignId to the original record seems the easiest.
Do you guys think there are any performance problems with this approach? Main one I see is I need to do a separate get_by_id call to fetch the latest original record using the foreignId