AddToVectorDatabase
AddToVectorDatabase[db,{vec1,…}]
adds a list of vectors veci to the VectorDatabaseObject[…] db.
AddToVectorDatabase[db,{vec1,…}{val1,…}]
adds new vector veci and associated value vali to the database db.
Details
- AddToVectorDatabase extends an existing VectorDatabaseObject with additional data, expanding the database’s storage and search capabilities.
- The database can be specified using:
-
"string" a string matching a named vector database db a VectorDatabaseObject - Possible values for the data to be added include:
-
{vec1,…} a list of vectors {vec1val1,…} a list of vectors and associated values {vec1,…}{val1,…} a rule between vectors and values - If db contains annotated vectors, each new veci should be tagged the same way. »
- Accepted forms of vali include:
-
"string" string labels <"tag1"v1,… > an association of tags and metadata values
Examples
open allclose allScope (6)
Data Sources (2)
Metadata (4)
Add vectors together with simple labels to an empty database:
Create a database with vectors annotated with single labels:
Add new vectors together with their labels:
Add vectors together with annotations in an Association to an empty database:
Create a database with vectors annotated with multiple tags:
Add vectors together with labels in an Association to a populated database:
Applications (1)
A single incorrect element will cause the database creation to fail:
To add all elements that are valid, create a empty database:
Use AddToVectorDatabase to incrementally add only the valid elements:
Properties & Relations (1)
Text
Wolfram Research (2024), AddToVectorDatabase, Wolfram Language function, https://reference.wolfram.com/language/ref/AddToVectorDatabase.html.
CMS
Wolfram Language. 2024. "AddToVectorDatabase." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AddToVectorDatabase.html.
APA
Wolfram Language. (2024). AddToVectorDatabase. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AddToVectorDatabase.html