Back to Home
Retrieval-Augmented Generation (RAG)
Embeddings in RAG
Embeddings in RAG turn document chunks into vectors so the system can search by meaning.
This demo uses simple learning vectors, not real AI embeddings.
Interactive Playground
Document Chunks
Live Visualization
📄 Chunks
→
🔢 Embeddings
→
🔍 Compare with Query
→
🎯 Best Match
Query Vector
Chunks Ranked by Similarity
Statistics
4
Chunks
0
Query Tokens
0
Comparisons Made
—
Best Matching Chunk
0%
Highest Similarity
How It Works
📄
Document
Chunks
Chunks
→
🔢
Embeddings
→
❓
Query
Embedding
Embedding
→
🔍
Similarity
Search
Search
→
🎯
Relevant
Chunk
Chunk
🎓
Tips
3 tips
Similar meaning, similar vectors. Even without shared words, "money back" and "refund" can point in a similar direction.
Cosine similarity measures direction, not length. It checks how closely two vectors point the same way.
Real embedding models use hundreds or thousands of dimensions learned from massive text datasets, this demo uses just a handful to stay easy to visualize.
💡
Key Takeaway
RAG uses embeddings so it can find useful information by meaning, not just exact words.