software-mansion / software-mansion/react-native-executorch
[RNE Rewrite] Add a small standalone on-device vector store
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.7k
- Forks
- 96
- Avg merge
- 20h 51m
- Merged PRs (30d)
- 59
Description
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
- Raised by @barhanc in review of #1292: a small vector DB should be its own separate functionality, not folded into the embedding flow.
- Depends on / follows: #1292.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the embedding work in #1292 and the existing vector-ranking logic in the nlp and computer-vision demos. Define the standalone in-memory store around plain vectors, ids, and metadata, with add, remove, and top-k similarity queries using cosine or dot-product scores. Done means the utility is independent of the embedders and supports the listed operations without an external vector database.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- machine-learning, mobile, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100