Skip to content

oracular / LearningConfig

Interface: LearningConfig ​

Defined in: types.ts:49

How the engine learns from the user's own outcomes.

Example ​

ts
const config = {
  intents,
  learning: { priorEpisodes: 5, gain: 1.5, halfLife: 90 * 24 * 60 * 60 * 1000 },
};

Properties ​

PropertyTypeDescriptionDefined in
gain?numberCaps learned magnitude at gain × |initial weight| for every lift option. Default 2; at most 1e6.types.ts:61
halfLife?numberHalf-life of learned hit/miss counts, in the same unit as at. Omit for no forgetting.types.ts:59
lift?LiftTypeOptional association measure. Every choice is converted to a score in [−1, 1], neutral at zero, before learning: ratios use (R − 1)/(R + 1), relative/log lift use x/(1 + |x|), and absolute/normalized differences keep their scale. Omit to preserve the existing normalized difference exactly. 'association-rule' uses the overall outcome rate as its baseline; the others use episodes without the signal. Raw ratios are reporting metrics, never weights.types.ts:57
priorEpisodes?numberPseudo-count behind the developer's initial weight: how many observed episodes it takes to weigh as much as the prior. Default 10; at most 1e6.types.ts:63

Released under the MIT License.