Skip to main content

FusedEntry

@forge/monorepo


@forge/monorepo / backend/src / FusedEntry

Type Alias: FusedEntry<T, S>

FusedEntry<T, S> = object

Defined in: backend/src/knowledge/retrieval.ts:238

Reciprocal rank fusion, extracted so there is exactly one of it — REQ-045 (#204), task #210, AC-2.

find_tools fuses two signals over tool descriptors and this fuses two signals over knowledge chunks. Those are the same algorithm with a different corpus, and writing it twice is the shape this repository keeps finding defects in: the second copy drifts, usually in the tie-break or the normalisation, and the drift shows up as one ranker being subtly worse with nothing pointing at why.

Generic over the item and its key. The key is what merges an item found by both signals; without it a chunk in both lists would fuse with itself and score twice.

Scores come back normalised against the best fused score, because a raw RRF sum means nothing on its own — 2/61 is not "poor", it is "found first by both signals". Normalising is what lets one relevance floor apply to any corpus, tools included.

Type Parameters

T

T

S

S extends string

Properties

item

readonly item: T

Defined in: backend/src/knowledge/retrieval.ts:239


score

readonly score: number

Defined in: backend/src/knowledge/retrieval.ts:241

0–1, relative to the best entry in this fusion. Comparable within one query, never across two.


signals

readonly signals: readonly S[]

Defined in: backend/src/knowledge/retrieval.ts:242