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

Opening a session

Omit llmModel for a retrieval-only session: search works, query does not.

RagSession

Ingesting

Ingestion chunks the text, embeds each chunk, and indexes it. It is the slow part, so do it once and keep the session, rather than re-ingesting per question.

Retrieval without generation

Useful when you want to show sources, or to feed the matches into your own prompt.

Streaming an answer

Configuration

Overlap matters more than it looks. Without it, a sentence split across a chunk boundary is retrievable from neither half.

Closing

Sessions hold the index and the loaded models. Close them when the screen goes away.

Housekeeping