Upsert
AI-generatedSummary
Insert or update one or more embeddings into a PGVector store collection.
Inputs
- collection (required) — Collection name to organize embeddings (partition value).
- embedding (required) — Embedding vector as JSON array of numbers. Must be non-empty; operation throws if missing or empty.
- dimensions (required) — Number of dimensions in the embedding vectors. Default 1536.
Output shape
One output item per executed embedding. Single mode returns the upserted record's JSON. Batch mode returns one JSON object per input item that was upserted.
The output JSON reflects the record as stored by the database, including any auto-generated IDs or metadata.
Examples
Example 1: Single upsert with explicit ID
Collection: myCollection, Dimensions: 768, ID: my-uuid-123, Embedding: [0.1, 0.5, ...], Content: some text, Metadata: {source: api}, Schema Mode: default
Example 2: Batch upsert from workflow items
Collection: myCollection, Dimensions: 768, Upsert Mode: batch, Field Mapping: idField=id, externalIdField=externalId, contentField=content, metadataField=metadata, embeddingField=embedding. Each input item's fields are mapped and upserted.