1. Chunk the document
Paste any text. We'll slice it into overlapping windows — the raw units that get embedded and retrieved later.
Add at least 40 characters before chunking.
How many characters go into each chunk.
Characters repeated between consecutive chunks, so context isn't lost at the cut.
2. Create vector embeddings
Each chunk becomes a numeric fingerprint of its meaning, instead of showing the raw numbers, we show which words that actually shaped the fingerprint — the heavier the bar, the more that word defined the chunk's vector.
3. Save to the vector store
Vectors + their source text get committed to a server-side store keyed to your session, so they can be searched later at query time.
4. Ask a question
Your question is embedded with the exact same method, so it lands in the same vector space as the chunks.
5. Retrieve top-K matching chunks
We rank every stored chunk by cosine similarity to your query vector, and keep the closest K.
6. Compose the grounded prompt
The retrieved chunks are stitched into a system prompt that instructs the model to answer strictly from this context.
7. Generate the answer
The composed prompt is sent to an LLM. The answer should be traceable directly back to the chunks above.