DocumentChunk.Embedding

DocumentChunk.Embedding property

Gets or sets the embedding vector for this chunk.

public ReadOnlyMemory<float>? Embedding { get; set; }

Property Value

A ReadOnlyMemory of floats representing the embedding vector generated by an AI model, or null if no embedding has been computed yet.

Remarks

This property intentionally has no [VectorStoreVector] attribute because the number of dimensions depends on the embedding model chosen at runtime and cannot be declared at compile time. Use GetVectorDefinition to obtain a VectorStoreCollectionDefinition that correctly registers this property as the vector field with the appropriate dimension count.

See Also