vector

embedding.update

Replace the embedding for one vector, keeping its metadata.

strata vector update-embedding

wire vector_update_embedding

Replaces one visible vector's embedding and leaves its metadata as it stands - the mirror of `vector update-metadata`, which patches metadata and leaves the embedding. Use this to re-embed a document after a model change, a re-chunk or a backfill; `vector upsert` writes the whole record, so metadata not restated there is removed. Missing vectors return a no-op mutation acknowledgement and are never created. With `text` instead of a vector, the text is embedded through the collection's recorded model on the same inference path as `vector upsert`, so the `inference.*` failures listed below apply only to that form.

Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.

To see the complete help for this command, run:

strata vector update-embedding --help

Example

Re-embed a vector without restating its metadata.

strata vector collection create docs 3 --metric cosinecreated collection docs (3 dimensions, cosine)strata vector upsert docs a '[1.0,0.0,0.0]' --metadata '{"lang":"en","tier":1}'created a in docsstrata vector update-embedding docs a '[0.0,1.0,0.0]'updated a in docsstrata vector query docs '[0.0,1.0,0.0]' --k 1KEY  SCORE  METADATAa      1.0  {"lang":"en","tier":1}

Parameters

NameTypeRequiredDescription
collectionstringyesCollection name.
keystringyesVector key.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
spacestring or nullnoTarget product space. Defaults to `"default"`.
textstring or nullnoText to embed with the collection's recorded model, instead of supplying a vector. Exactly one of `vector` or `text`.
vectorarraynoDense embedding. Accepted at wire (f64) precision and narrowed to the stored f32; a value that underflows or overflows f32 is rejected. Empty when `text` is supplied instead, on the same terms as `VectorUpsert`: a vector carries no model, so supplying one is the caller's statement that the collection's recorded model produced it.

Returns

MutationAck

  • dataobject
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

CodeRetryCommit outcome
failed_precondition.engine.runtime_closednevernot_started
not_found.engine.branchnevernot_applicable
invalid_argument.engine.product_spacenevernot_started
invalid_argument.engine.vector_collectionnevernot_started
invalid_argument.engine.vector_keynevernot_started
not_found.engine.vector_collectionnevernot_applicable
invalid_argument.engine.vector_dimensionnevernot_started
invalid_argument.engine.vector_embeddingnevernot_started
invalid_argument.executor.vector_dimensionnevernot_started
invalid_argument.executor.vector_inputnevernot_started
failed_precondition.engine.embedding_model_missingnevernot_started
inference.invalid_requestnevernot_applicable
inference.unsupported_operationnevernot_applicable
inference.missing_modelafter_state_changenot_applicable
inference.unknown_modelnevernot_applicable
inference.io_failureafter_state_changenot_applicable
inference.model_load_failedafter_state_changenot_applicable
inference.local_runtime_failedafter_state_changenot_applicable
inference.registry_corruptnevernot_applicable
inference.missing_api_keyafter_state_changenot_applicable
inference.provider_auth_failedafter_state_changenot_applicable
inference.provider_unavailablesame_requestnot_applicable
inference.provider_timeoutsame_requestnot_applicable
inference.provider_rate_limitedafter_state_changenot_applicable
inference.provider_quota_exhaustedafter_state_changenot_applicable
inference.provider_model_not_foundnevernot_applicable
inference.provider_malformed_responsesame_requestnot_applicable
inference.unsupported_providernevernot_applicable
inference.unsupported_parameternevernot_applicable
← All 24 Vectors commands

agents: this page as markdown → /docs/reference/vector/embedding/update.md