Skip to main content

CommunityMapper

@forge/monorepo


@forge/monorepo / backend/src / CommunityMapper

Interface: CommunityMapper

Defined in: backend/src/knowledge/graph-global.ts:67

Scores one community summary against the question.

A port, so the map phase can be a cheap model, a local one, or — for a test — a deterministic function. This is the call that runs once per community per query, so it is the one worth making cheap.

Properties

id

readonly id: string

Defined in: backend/src/knowledge/graph-global.ts:68

Methods

map()

map(input): Promise<{ relevance: CommunityRelevance; usage?: { inputTokens?: number; outputTokens?: number; }; }>

Defined in: backend/src/knowledge/graph-global.ts:69

Parameters

input
community

StoredCommunity

query

string

Returns

Promise<{ relevance: CommunityRelevance; usage?: { inputTokens?: number; outputTokens?: number; }; }>