This is retrieval-augmented understanding, entirely on-device. Stage 1: Jina's code
embedder ranks a snippet bank against your English question and pulls the best match. Stage
2: that snippet is handed to TinyLlama-1.1B — a small chat
LLM — which explains, in plain language, what the code does. The embedder finds; the LLM explains.
Both run in your browser, so a private codebase stays private.
Ask a question about the code
Stage 1 — retrieved snippet
Stage 2 — TinyLlama's explanation
The pipeline
Embed + rank — your question and every snippet become 768-d vectors (Jina, WASM). Cosine picks the top snippet.
Prompt — the retrieved snippet is dropped into a chat prompt: "Explain what this code does."
Generate — TinyLlama streams an explanation token-by-token (WebGPU if available, else WASM). No snippet or question ever leaves the device.