chooseLevel
@forge/monorepo / backend/src / chooseLevel
Function: chooseLevel()
chooseLevel(
available,requested?):number
Defined in: backend/src/knowledge/graph-global.ts:160
Which level of the hierarchy to read.
The coarsest available, by default. Reading every level multiplies cost for largely repeated content — a level-1 community contains the level-0 ones under it, so summarising both says the same thing twice at twice the price. Coarse suits "what are the main themes"; a caller with a narrower question passes a finer level.
Exported because the choice is worth testing on its own: picking the wrong level is the difference between an answer about the corpus and an answer about one team.
Parameters
available
readonly number[]
requested?
number
Returns
number