Repository navigation
feat(memory): Match half-typed words and cache query embeddings in Cmd+K search - #4119
Merged
Merged
Conversation
…d+K search Typed memory search added `:*` to `english` stems, so a half-typed inflected word missed its memory until the word was complete. A new `simple` word-prefix leg, read from its own partial GIN index on active rows, now runs beside the `english` and vector legs and is fused with them. Agent recall does not change. The vector leg now runs only for 3 or more characters, reuses the embedding of the same text for 10 minutes, and adds each embedding call's cost to a daily `junior_stats` counter in whole micro-USD. Co-Authored-By: BYK <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Nov 23, 2026
BYK
enabled auto-merge (squash)
November 23, 2026 19:37
Contributor
|
1 screenshot change — 1 changed · 0 added · 0 removed Review screenshots in Frameshift
|
22 tasks done
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #4106, part of #4095.
Half-typed words. Typed memory search added
:*toenglishstems, so a half-typed inflected word missed its memory:runndid not match "running" (stemrun) until the word was complete. Typed search now adds asimpleword-prefix leg, the same match that Inbox items and Automations use. It reads a new partial GIN index on active rows (0166_memory_prefix_index, createdCONCURRENTLY). Its rank is fused with theenglishand vector legs in the shared ranking, so it adds a parallel statement and no serial round. Theenglishleg goes back to recall's exact stem match. Agent recall does not change.Embedding calls.
junior_statscounter (search/embedding_cost_micro_usd, one row per model). A search has no Conversation to bill. One short query costs a fraction of a micro-USD, so plain rounding would store 0 every time. The newusdToMicroUsdUnbiasedindb/micro-usd.tsrounds up with the chance of the fraction, so the daily total in whole micro-USD stays right on average. The write runs beside the vector query.via @BYK.
--
View Session [Sentry]