Skip to content

Repository files navigation

nymard_rag

A browser-side RAG demo — retrieval-augmented generation that runs embeddings entirely in the browser via transformers.js (@xenova/transformers). No backend, no API keys, no server round-trips.

Stack

React 19 · Vite · TypeScript · transformers.js (WASM/WebGPU embeddings)

Run

npm install
npm run download-model   # fetch the embedding model locally
npm run dev              # http://localhost:5173

How it works

  1. An embedding model is loaded in-browser via transformers.js.
  2. Documents are chunked and embedded client-side.
  3. A query is embedded and matched against the chunks by cosine similarity.
  4. The top chunks are surfaced as retrieval context.

Everything happens on the client — useful for privacy-sensitive RAG, offline demos, and zero-infra prototypes.

About

Browser-side RAG demo — runs embeddings entirely in the browser via transformers.js (@xenova), no backend. React + Vite + TypeScript.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages