Versions in this module Expand all Collapse all v0 v0.1.0 Jul 22, 2026 Changes in this version + var ErrUnboundArgument = errors.New("unbound argument") + type BindInput struct + ContextRaw map[string]any + ContextTypes map[string]string + ContextValues map[string]string + Previous core.QueryEvent + RecentRaw map[string]any + RecentTypes map[string]string + RecentValues map[string]string + Template core.Template + type BoundArg struct + Confidence float64 + Name string + Position int + Raw any + Source Source + SourceArgPosition int + Type string + Value string + type BoundQuery struct + Args []core.ArgValue + BoundArgs []BoundArg + Confidence float64 + RuleSuccess int + TemplateID core.TemplateID + type Config struct + ConfidenceThreshold float64 + MaxRules int + MinTrials int + type Learner struct + func New(cfg Config) *Learner + func (l *Learner) Bind(prev core.QueryEvent, tmpl core.Template) (BoundQuery, error) + func (l *Learner) BindPlan(input BindInput) (BoundQuery, error) + func (l *Learner) ObserveTransition(prev core.QueryEvent, curr core.QueryEvent) + func (l *Learner) Restore(snapshot Snapshot) error + func (l *Learner) RulesLearned() int + func (l *Learner) Snapshot() Snapshot + type Rule struct + FromTemplate core.TemplateID + LastSeen uint64 + SourceArg int + Successes int + TargetArg int + ToTemplate core.TemplateID + Trials int + func (r Rule) Confidence() float64 + type Snapshot struct + Clock uint64 + Rules []Rule + type Source string + const SourceContextValue + const SourcePreviousArg + const SourceRecentSemantic