Skip to content

VectorChunk

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

A single chunk to write.

public sealed record VectorChunk : IEquatable<VectorChunk>

objectVectorChunk

IEquatable<VectorChunk>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

public VectorChunk()

The chunk’s text.

public required string Content { get; init; }

string

The chunk’s embedding. Its length MUST match IVectorSearchStore.Dimensions; otherwise the write fails.

public required ReadOnlyMemory<float> Embedding { get; init; }

ReadOnlyMemory<float>

The sequence number within the source (0-based).

public required int Index { get; init; }

int

Optional metadata. Can be used for filtering.

public IReadOnlyDictionary<string, string>? Metadata { get; init; }

IReadOnlyDictionary<string, string>?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(VectorChunk? other)

other VectorChunk?

bool

public override int GetHashCode()

int

public override string ToString()

string

public static bool operator ==(VectorChunk? left, VectorChunk? right)

left VectorChunk?

right VectorChunk?

bool

public static bool operator !=(VectorChunk? left, VectorChunk? right)

left VectorChunk?

right VectorChunk?

bool