Skip to content

[RNE Rewrite] Add a small standalone on-device vector store #1303

Description

@msluszniak

Summary

Follow-up to the embeddings work in #1292. Add a small on-device vector store with similarity search as a standalone feature — not coupled to the embedding flow.

Motivation

#1292 adds text/image embedders that return L2-normalized vectors, but consuming them still requires the app to keep its own array of vectors and hand-roll cosine ranking (as both the nlp and computer-vision demos currently do). A minimal, reusable vector store would cover the common "embed once, query many" use case (semantic search, RAG retrieval, zero-shot ranking) without every app reimplementing it.

Proposal

A small, self-contained utility that:

  • Stores a set of vectors with associated metadata/ids.
  • Supports add / remove / query by nearest neighbors (cosine / dot-product), returning top-k with scores.
  • Is decoupled from the embedders — it takes plain vectors as input, so any source (our embedders or external) works.

Kept intentionally minimal (in-memory to start; persistence can be a later increment).

Explicitly out of scope

  • Not part of the embedding pipeline/API — it lands as its own feature in a separate PR.
  • No external vector-DB dependency for the first pass.

Context

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions