hubDiscount
@forge/monorepo / backend/src / hubDiscount
Function: hubDiscount()
hubDiscount(
provenanceSize):number
Defined in: backend/src/knowledge/graph-retrieval.ts:181
How much an entity's breadth discounts it — the hub problem, in one line.
docs/01-architecture.md and concepts/architecture.md appeared in miss after miss. Generic entities
("run", "tool", "platform") are extracted from nearly every chunk, link to nearly everything, and drag the
architecture overview into every traversal. An entity that touches half the corpus tells you almost nothing
about which chunk you want, and counting it equally with a specific one is the mechanism by which the
overview outranks the page that answers the question.
A logarithmic discount rather than an IDF proper, because IDF needs the corpus size and this needs only what is already in hand. An entity in 2 chunks keeps most of its weight; one in 200 keeps about a seventh of it.
Parameters
provenanceSize
number
Returns
number