Skip to main content

Module feedback

Module feedback 

Source
Expand description

Feedback store — durable (query, symbol, verdict) triples.

Agents and users record verdicts on search results via asd feedback mark or the MCP feedback_mark tool. Verdicts are stored in the ASD sidecar and applied as score adjustments in apply_feedback_adjustments.

§SQLite write-through cache

AsgFeedbackStore optionally holds a borrowed fts connection — when present, list_all returns the SQLite cache (fast, ~0 git reads) and record additionally writes to SQLite after the git commit. The git object store remains authoritative: if SQLite is empty (e.g. first run after git pull), we fall back to the git tree walk and re-populate the cache as a side effect. Running asd index / asd reindex calls sync_feedback_entries for a full reconciliation.

Structs§

AsgFeedbackStore

Constants§

DEFAULT_FEEDBACK_HALF_LIFE_DAYS
Default half-life for feedback boost decay, in days.

Traits§

FeedbackStore

Functions§

decay_factor
Pure decay function. Returns a multiplier in [0.0, 1.0] for an observation of age_days against half_life_days. Uses the classical exponential decay: factor = 0.5 ^ (age / half_life).
decay_for_entry
Compute the decay multiplier for an entry whose created_at is known, given the current time. Used at feedback-boost application time to scale Useful verdicts by age.