Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/memory / / FusionStrategy

Type Alias: FusionStrategy

ts
type FusionStrategy = 
  | {
  strategy: "rrf";
}
  | {
  k?: number;
  strategy: "weighted";
  weights: FusionWeights;
};

Defined in: packages/memory/src/tiers/semantic-memory.ts:88

Score-fusion strategy for SemanticMemory.search (X-2).

  • 'rrf' (the default when fusion is omitted) fuses the candidate lists through the configured reranker — the zero-tuning RRFReranker unless one was overridden.
  • 'weighted' fuses through WeightedRRFReranker, scaling each list's reciprocal-rank contribution by its FusionWeights, for callers who have calibrated retriever reliability against labels (the P0-1 eval harness). At equal weights it reproduces RRF.

Union Members

Type Literal

ts
{
  strategy: "rrf";
}

Type Literal

ts
{
  k?: number;
  strategy: "weighted";
  weights: FusionWeights;
}
NameTypeDescriptionDefined in
k?numberOverride the RRF constant for the weighted fuse. Default 60.packages/memory/src/tiers/semantic-memory.ts:94
strategy"weighted"-packages/memory/src/tiers/semantic-memory.ts:91
weightsFusionWeights-packages/memory/src/tiers/semantic-memory.ts:92

Stable