Skip to main content

RetrieverDeps

@forge/monorepo


@forge/monorepo / backend/src / RetrieverDeps

Type Alias: RetrieverDeps

RetrieverDeps = object

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

Properties

candidates?

readonly optional candidates?: number

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


embeddings

readonly embeddings: EmbeddingProvider

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


graphGlobal?

readonly optional graphGlobal?: GraphGlobalSearch

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

Serves mode: "graph-global" — REQ-064 (#270), task #274.

Separate from graphLocal rather than one graph dependency, because they are independently useful: a deployment can run entity-centric retrieval without paying for community summaries at all, and #273 landed before #272 for exactly that reason.


graphLocal?

readonly optional graphLocal?: GraphLocalSearch

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

Serves mode: "graph-local" — REQ-064 (#270), task #273.

Optional for the same reason navigator is, and its absence is the same named refusal. GraphRAG is opt-in and expensive to index, so a deployment that never enabled it supplies nothing here and asking for the mode says so rather than quietly returning embeddings.


keyword

readonly keyword: KeywordIndex

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


readonly optional navigator?: Navigator

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

Serves mode: "navigate" — task #219, AC-4.

Optional, and its absence is a named refusal for that mode rather than a fall back to semantic search: a caller that asked for navigation and silently got embeddings would attribute the results to the wrong mechanism, which is the only way this spike could have done harm.


relevanceFloor?

readonly optional relevanceFloor?: number

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

Relative: how much worse than the best hit is still worth returning.


reranker?

readonly optional reranker?: Reranker

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


semanticFloor?

readonly optional semanticFloor?: number

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

Absolute: how similar a vector hit must be to be a candidate at all.

Two floors because they answer different questions, and one cannot do both — a relative floor can never reject a uniformly poor result set, because something is always the best of it. This is what makes AC-4 possible: without it the vector index returns every chunk it is asked for (0.5 is orthogonal, not "no match"), the best of them normalises to 1.0, and every query finds something.


vector

readonly vector: VectorIndex

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