Skip to main content

DEFAULT_GRAPH_DEPTH

@forge/monorepo


@forge/monorepo / backend/src / DEFAULT_GRAPH_DEPTH

Variable: DEFAULT_GRAPH_DEPTH

const DEFAULT_GRAPH_DEPTH: 2 = 2

Defined in: backend/src/knowledge/graph-retrieval.ts:55

How far a traversal goes by default.

One hop is often too few — "which teams depend on the retry budget" is one hop, but "what does the retry budget affect downstream" is two. Three is a large fraction of a connected graph, and the cost is not the traversal but the chunks it drags in. Two is the useful middle, and it is a parameter because the right answer is corpus-shaped.