Practical ยท feature-extraction ยท WASM
The two jobs an encoder earns its keep on. Semantic search: rank a corpus against a query by meaning, not keyword overlap โ the guts of search and RAG. Near-duplicate detection: find pairs that say the same thing even when the words differ, so you can collapse them. Both run entirely on your device.
Everything below runs on these lines. Edit them, or keep the mixed support/knowledge sample.
The query and every passage are embedded with NeoBERT; ranking is by cosine โ no keyword overlap required.
Embed every line, then flag pairs whose cosine is above a threshold โ "same thing, different words". Drag the slider to trade recall for precision. (Base-encoder cosines run high, so the useful threshold sits higher than for a fine-tuned embedder.)