Understand how retrieval pipelines actually work — not just your final answer.
Most RAG debugging stops at the generated output. This playground goes deeper. It lets you inspect every stage of the retrieval process: how your document was chunked, what got retrieved, why it ranked the way it did, and where it broke down.
Most retrieval issues originate before generation.
Common failure points include:
- ❌ Wrong chunk boundaries cutting off context
- ❌ Weak semantic similarity scores
- ❌ Poor reranking logic
- ❌ Retrieval thresholds that are too aggressive or too lenient
Without visibility into retrieval, you're guessing.
This project removes that guesswork.
PDF Upload
↓
Text Extraction
↓
Chunking Strategy
(Fixed / Fixed+Overlap / Recursive)
↓
Metadata Enrichment
↓
Embedding Generation
(Gemini text-embedding-004)
↓
Local Vector Index
(Cosine Similarity Search)
↓
Hybrid Reranking
(Vector + Keyword Matching)
↓
Threshold Filtering
↓
Evaluation Dashboard
- Uniform chunk size
- No overlap between chunks
- Fast and simple baseline
- Adjacent chunks share context
- Reduces context fragmentation
- Improves retrieval continuity
- Splits by:
- Paragraphs
- Sections
- Headings
- Preserves semantic boundaries
- Produces more meaningful chunks
Retrieval quality is improved using a hybrid scoring mechanism.
Final Score =
(Vector Similarity × 0.55)
+
(Lexical Match Score × 0.45)
Benefits:
- Captures semantic meaning
- Rewards exact keyword matches
- Reduces irrelevant retrievals
Only high-confidence chunks are returned.
Score >= 0.70
This helps eliminate weak matches and improves answer quality.
Inspect every retrieval decision.
View:
- Chunk content
- Metadata
- Similarity scores
Analyze:
- Similarity score spread
- Retrieval confidence
Bucket retrieved chunks into:
- High Confidence
- Medium Confidence
- Low Confidence
Understand:
- Which chunks ranked highest
- Why they were selected
User Query
↓
Embedding Generation
↓
Vector Search
↓
Hybrid Reranking
↓
Threshold Filtering
↓
Top-K Retrieval
↓
LLM Response
↓
Evaluation Dashboard
| Layer | Technology |
|---|---|
| Frontend | React + TypeScript |
| Styling | Tailwind CSS |
| Backend | Node.js + Express |
| Embeddings | Gemini text-embedding-004 |
| Vector Search | Local Vector Index |
| Similarity Metric | Cosine Similarity |
| Document Processing | PDF Extraction |
| Evaluation | Custom Retrieval Metrics |
git clone https://github.com/yourusername/rag-evaluation-playground.git
cd rag-evaluation-playgroundcd client
npm installcd server
npm installCreate:
.envAdd:
GEMINI_API_KEY=YOUR_API_KEYnpm run devnpm run devUpload a PDF
Examples:
- Resume
- Research Paper
- Report
- Documentation
Select a chunking strategy
- Fixed
- Fixed + Overlap
- Recursive
Ask a question
Example:
What are the key achievements?
Summarize the leadership section.
Inspect retrieval results
Observe:
- Retrieved chunks
- Similarity scores
- Ranking order
- Confidence levels
Switch strategies and compare
Evaluate how chunk boundaries impact:
- Retrieval quality
- Ranking performance
- Context preservation
Does recursive chunking outperform fixed-size chunks?
How much overlap improves retrieval continuity?
Is 0.70 too strict or too lenient?
Does keyword reranking meaningfully improve ordering?
This project was built to understand:
- Retrieval-Augmented Generation (RAG)
- Chunking strategies
- Embedding generation
- Vector similarity search
- Hybrid reranking
- Retrieval observability
- RAG evaluation techniques
The goal is to understand why retrieval systems perform the way they do — not just whether they return an answer.
- Cross-Encoder Reranking
- Pinecone / pgvector Integration
- Retrieval Precision & Recall Metrics
- Groundedness Evaluation
- Hallucination Detection
- Multi-Document Retrieval
- Retrieval Benchmarking Suite
Retrieval is where most RAG systems succeed or fail.
This playground makes retrieval observable, measurable, and comparable so you can systematically improve RAG performance.