Skip to main content

VectorSearchHit

@forge/monorepo


@forge/monorepo / backend/src / VectorSearchHit

Type Alias: VectorSearchHit

VectorSearchHit = object

Defined in: backend/src/persistence/index.ts:1434

Properties

chunk

readonly chunk: KnowledgeChunk

Defined in: backend/src/persistence/index.ts:1435


score

readonly score: number

Defined in: backend/src/persistence/index.ts:1445

0–1, higher is closer. Normalised so a caller never has to know the metric.

0.5 means unrelated, not "no match". The mapping is (cosine + 1) / 2, so orthogonal vectors — two texts with nothing in common — score exactly 0.5, and only actively opposite vectors score below it. That is why a vector index with no minScore returns every chunk it is asked for: there is no such thing as a non-match, only a distant one. Any caller that needs "found nothing" must supply a floor above 0.5, which is what SEMANTIC_RELEVANCE_FLOOR is for.