Create new vector embeddings or update existing ones with insert-or-update semantics.
Copy
Ask AI
::UpsertV(vector, {properties})
UpsertV is a traversal step that operates on an existing traversal context. The type comes from the preceding traversal (V<Type>), not from the upsert call itself. If the traversal returns existing vectors, they are updated; if no vectors are found, a new vector is created.
Vector data is required for UpsertV. You can provide vector data as:
A literal array of floats (e.g., [0.1, 0.2, 0.3])
The Embed() function to generate embeddings from text
You can use the built-in Embed function to generate embeddings from text.
All vectors in a vector type must have the same dimensions. If you change your embedding model, the new vectors will have different dimensions and will cause an error. Ensure you use the same embedding model consistently for all vectors.
Operates on traversal context: updates if vectors found, creates if empty
When updating, UpsertV merges properties: it updates specified properties while preserving any existing properties that aren’t included in the upsert. The vector data itself is also updated.