reinforce tool ¶Records feedback on which recalled memories were useful, so the store
learns to rank genuinely helpful facts higher over time. This is the
crux of OwnSona’s learning behaviour: it adjusts a per-memory
salience weight that recall multiplies into its ranking. It never
edits a memory’s text and never deletes anything, so it is exempt from
the keep='Y' lock (like confirm).
There is no time-based decay: a memory is never demoted merely for
being old. Salience moves only on an explicit reinforce (or a
confirm, which counts as positive feedback).
memory_idsRequired array of integers. The ids that helped (or hurt) —
typically ids returned by recall / search_memory.
deltaNumber, −1.0–1.0. Optional, default +1. Positive means
the memory was helpful (rank it higher); negative means it was unhelpful
or wrong (rank it lower).
queryOptional string. The question or topic these memories helped answer —
ideally the same query you passed to recall. With positive
feedback, OwnSona moves each memory’s learned context centroid
toward this query’s embedding, so similar future queries surface these
memories first — contextual ranking, beyond the single global
salience weight. Ignored for negative feedback.
{
"ok": true,
"reinforced": [
{ "id": 17, "salience": 0.775, "use_count": 3, "context_count": 1 }
],
"skipped": [ 99 ],
"message": "Ok"
}
reinforced lists the active rows that were updated; skipped
(present only when non-empty) lists requested ids that were unknown or
already soft-deleted. Duplicate ids are collapsed.
INVALID_INPUT (empty memory_ids, out-of-range delta),
LIMIT_EXCEEDED, DATABASE_ERROR.