Skip to content

feat(recall): semantic stemming — paginate↔pagination, authenticate↔authentication#85

Merged
QodeXcli merged 1 commit into
mainfrom
feat/recall-stemming
Jul 1, 2026
Merged

feat(recall): semantic stemming — paginate↔pagination, authenticate↔authentication#85
QodeXcli merged 1 commit into
mainfrom
feat/recall-stemming

Conversation

@QodeXcli

@QodeXcli QodeXcli commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Strengthens recall_approach's search from exact-token to semantic-lexical: it now matches surface-different but same-root terms by stemming before the TF-cosine ranking.

  • a query about paginate recalls a past episode about pagination
  • authenticate recalls authentication
  • backups recalls backup

Implementation:

  • approach-recall.ts: stem() (PURE, longest-suffix-first, guards words ≤4 chars) + semanticTokens(); the ranker vectors both query and sources through it
  • Localized to recall — the shared tokenize (which drives skill-dedup thresholds) is deliberately untouched, so no existing similarity behavior shifts
  • Composes with the existing recency tilt (#recency) and MMR diversity (feat(recall): MMR diversity in recall_approach #78)

+2 tests (semantic match end-to-end; stem() unit cases). Full suite 1448 green, tsc clean.

…ion, authenticate↔authentication

recall_approach now matches lexically-different but semantically-equal terms by collapsing words
to a common root before the TF-cosine ranking: a query about "paginate" recalls a past episode
about "pagination"; "authenticate" recalls "authentication"; "backups" recalls "backup".

- approach-recall.ts: stem() (PURE, longest-suffix-first, guards words ≤4 chars) + semanticTokens();
  the ranker vectors both query and sources through it. Localized to recall — the shared tokenizer
  (skill-dedup thresholds) is untouched.
- Composes with the existing recency tilt + MMR diversity.
@QodeXcli QodeXcli merged commit b4e34fd into main Jul 1, 2026
2 checks passed
@QodeXcli QodeXcli deleted the feat/recall-stemming branch July 1, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant