Foresight.Recall.FusionConfig (Foresight v0.1.0)

Copy Markdown View Source

Resolves the option list handed to Foresight.Recall.RRF.fuse/2.

D1 introduced calibrated fusion driven by the global :recall_fusion app config. D2 makes those parameters learnable PER BANK, so this resolves two layers: the global config, then a bank's config_overrides["recall_fusion"] on top.

Bank overrides arrive from JSONB, so mode and normalization come back as strings and are coerced to atoms against a closed allowlist — an unrecognised value is ignored rather than crashing recall or silently selecting a different fusion mode.

A bank with no override must resolve to exactly what the global layer alone produces; learned weights are opt-in per bank and absent means unchanged.

Summary

Functions

Fusion modes a bank override may name.

Resolve fusion opts from the global layer with an optional per-bank layer on top.

Functions

fusion_modes()

Fusion modes a bank override may name.

resolve(global, bank \\ nil)

@spec resolve(term(), term()) :: keyword()

Resolve fusion opts from the global layer with an optional per-bank layer on top.

global is the :recall_fusion app config (keyword list or map). bank is a bank's config_overrides["recall_fusion"] map, or nil.