add client-side embeddings cached in IndexedDB#2432
Open
Mbeaulne wants to merge 1 commit into
Open
Conversation
🎩 PreviewA preview build has been created at: |
This was referenced Jun 18, 2026
Collaborator
Author
8 tasks
626a971 to
60a4a12
Compare
8 tasks
Mbeaulne
commented
Jun 18, 2026
Mbeaulne
commented
Jun 18, 2026
Mbeaulne
commented
Jun 18, 2026
Mbeaulne
commented
Jun 18, 2026
Mbeaulne
commented
Jun 18, 2026
60a4a12 to
f6d7ea7
Compare
6e2b2ae to
d8565d2
Compare
f6d7ea7 to
27a3952
Compare
d8565d2 to
761f88a
Compare
316495b to
89c4999
Compare
41a7bd9 to
c379d9b
Compare
89c4999 to
92a80e1
Compare
This was referenced Jun 23, 2026
camielvs
reviewed
Jun 23, 2026
camielvs
reviewed
Jun 23, 2026
camielvs
reviewed
Jun 23, 2026
camielvs
reviewed
Jun 23, 2026
This was referenced Jun 23, 2026
f23785c to
4d1b974
Compare
93231fd to
1f37704
Compare
1f37704 to
a2ca752
Compare
4d1b974 to
7f152b7
Compare
a2ca752 to
bb386b4
Compare
7f152b7 to
a48133d
Compare
bb386b4 to
c5d57f1
Compare
a48133d to
5bcde1e
Compare
c5d57f1 to
a212484
Compare
5bcde1e to
1475699
Compare
maxy-shpfy
reviewed
Jun 26, 2026
maxy-shpfy
reviewed
Jun 26, 2026
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.

Description
Adds embedding-based semantic search as a pre-processing step before LLM reranking. When an AI provider API base is configured, the component search now fetches text embeddings for both the search query and all indexed components, ranks them by cosine similarity, and merges those results with the top lexical matches before passing candidates to the LLM reranker. This improves the quality of candidates surfaced to the reranker, particularly for queries that don't share keywords with component names or descriptions.
A new
componentSearchEmbeddingsservice handles embedding generation, cosine similarity scoring, and persistent caching of embeddings in IndexedDB (keyed by a FNV-1a hash of the text and model name) to avoid redundant API calls across searches. AmergeUniqueMatcheshelper deduplicates and merges lexical and embedding results by digest before reranking.The embedding fetch is tracked with an
isEmbeddingSearchPendingflag, which gates the rerank active state and disables the AI search buttons while in progress, keeping the spinner and disabled states consistent with the existing reranking UX.Related Issue and Pull requests
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
https://api.openai.com/v1) in AI provider settings.Additional Comments
The embedding model is hardcoded to
text-embedding-3-small. If noapiBaseis set, the embedding step is skipped entirely and behaviour is identical to before this change.