vector

sample

Sample vectors with values and version facts.

strata vector sample

wire vector_sample

Returns a deterministic representative sample of vectors from a collection: the total live count and up to `count` entries (default 10), evenly strided over the ordered keys. Latest state only.

Paginated responses use opaque cursors. Clients should pass the returned cursor back to the same command shape and must not parse cursor contents.

To see the complete help for this command, run:

strata vector sample --help

Example

A representative sample of stored vectors plus the total count.

strata vector collection create docs 3 --metric cosinestrata vector upsert docs a [1.0,0.0,0.0]strata vector upsert docs b [0.0,1.0,0.0]strata vector sample docs

Parameters

NameTypeRequiredDescription
collectionstringyesCollection name.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
countinteger or nullnoOptional sample count. Defaults to 10.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

SamplePage<VectorVersionedData>

  • dataobject

    Shared pagination continuation facts.

  • typestring

Errors

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

← All 22 Vectors commands

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