RAG retrieval playground
Chunk a real document, ask it a real question, and run real dense (embedding), keyword (BM25), and hybrid (RRF) retrieval against the resulting chunks — with real scores, not canned output.
The default example was checked against real Gemini embeddings before shipping: dense search correctly finds the paraphrased answer, while keyword search is pulled toward an unrelated chunk that happens to reuse the question's exact words. Edit the text or question and run it again — the disagreement is real, not guaranteed to survive every edit.
Tries paragraph breaks, then sentences, then words, before a hard cut.
6 chunks at this size.
Dense
Cosine similarity between gemini-embedding-001 embeddings of each chunk and the query.
Click “Run retrieval” to embed the chunks and the question.
Keyword (BM25)
Okapi BM25 over real term frequencies and inverse document frequency across these chunks.
Top pick: chunk 2
Hybrid (RRF)
Reciprocal Rank Fusion of the dense and keyword rankings above — k = 60, the standard constant.
Run retrieval first — hybrid needs both rankings to fuse.