Chunks → embeddings (RAG demo)
Split text into overlapping chunks, then turn each chunk into a numeric vector. This page is a teaching visualization: vectors are simulated locally so nothing leaves your browser. Production RAG uses a trained embedding model API.
Chunking
Sliding windows slice the document. Overlap keeps sentences that would otherwise be cut in half at boundaries.
Embedding
Each chunk becomes a fixed-length vector (here 48 numbers). Similar passages would land nearby with a real model—here you still see structure for the lesson.
Map (first two dimensions)
Quick 2-D peek at how chunks differ. Real tutorials often use PCA/t-SNE on hundreds of dimensions.
All chunks
Retrieval-Augmented Generation (RAG) combines search with language models. Documents are split into chunks—small passages that fit in context. Each chunk is converted into an embedding: a list of numbers capturing meanin
ding: a list of numbers capturing meaning. At query time, the system compares your question's embedding to chunk embeddings and retrieves the best matches to ground the answer.