← All demos

Document demo

Retrieval is the first half of RAG: split a document into chunks, turn each chunk into a vector, and find the ones closest in meaning to a question. This page runs all of it in your browser. Files never leave your machine.

1 Add a document

Plain text, Markdown, CSV or PDF, up to 10 MB. Only the first 60,000 characters are used.

Embedding model: waiting

2 See how it gets chunked

A chunk is the unit that gets embedded and retrieved. Change the strategy and the chunks redraw instantly.

Cuts every N characters, with overlap so ideas on a boundary appear in both chunks.

3 Ask for a chunk

Ask a question in your own words. It gets embedded the same way as the chunks and compared by cosine similarity.

4 Retrieved chunks

Top three matches. Click a result to find it in the document above.

Results appear here after you ask a question.