Skip to content

VectorSearchHit

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

A single search result.

public sealed record VectorSearchHit : IEquatable<VectorSearchHit>

objectVectorSearchHit

IEquatable<VectorSearchHit>

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

public VectorSearchHit()

The sequence number within the source.

public required int ChunkIndex { get; init; }

int

The chunk’s text.

public required string Content { get; init; }

string

The cosine distance. A smaller value means closer.

public required double Distance { get; init; }

double

The optional metadata given at write time.

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

IReadOnlyDictionary<string, string>?

The identifier of the source the chunk belongs to.

public required string SourceId { get; init; }

string

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(VectorSearchHit? other)

other VectorSearchHit?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(VectorSearchHit?, VectorSearchHit?)

Section titled “ operator ==(VectorSearchHit?, VectorSearchHit?)”
public static bool operator ==(VectorSearchHit? left, VectorSearchHit? right)

left VectorSearchHit?

right VectorSearchHit?

bool

operator !=(VectorSearchHit?, VectorSearchHit?)

Section titled “ operator !=(VectorSearchHit?, VectorSearchHit?)”
public static bool operator !=(VectorSearchHit? left, VectorSearchHit? right)

left VectorSearchHit?

right VectorSearchHit?

bool