Skip to main content
Open a session with an embedding model, add documents, ask questions.

RagSession

Ingesting from disk

A desktop app can point RAG at a real directory, which is the thing it has over the browser.
Ingestion chunks, embeds, and indexes. It is the slow part. Do it once, persist the index, and reopen it on the next launch rather than re-ingesting at every start. Show progress: a folder of a few hundred documents takes real time, and a frozen window looks like a crash.

Retrieval without generation

Useful for a search box over the same index, or for showing sources next to an answer.

Streaming an answer

Sources usually arrive before the first token, so you can show what the answer draws on while it is still being written.

Configuration

persistPath is what turns a slow first launch into a fast second one. Point it somewhere under the app’s user-data directory. Overlap matters more than it looks. Without it, a sentence split across a chunk boundary is retrievable from neither half.

Two models at once

A RAG session holds an embedding model and a language model. Embedding models are small, often tens of megabytes, so the pair is far lighter than two language models. See residency policy when several sessions compete.

Closing

Close on window close, not only on quit. A session left open holds both models.