AIVANA BRAYNOR
Interactive Lab

RAG Playground

Hands-on interactive environment for the Master AI-RAG-MCP curriculum. Explore retrieval strategies, visualise the Agentic RAG workflow, and evaluate documents with RAGAS — all in-browser.

Part 1·

Retrieval Strategy Comparator

Configure parameters and compare Dense, Sparse, and Hybrid retrieval strategies side-by-side.

Press Enter or click Run Comparison

Retrieval Parameters

Strategy Comparison Reference

StrategyAlgorithmBest ForWeaknessTypical MRR
DenseANN / CosineSemantic queriesOut-of-vocab terms0.85–0.94
SparseBM25 / TF-IDFExact keyword matchSynonym blindness0.72–0.85
HybridRRF fusionGeneral purpose RAGHigher latency0.88–0.96
Part 2·

Agentic RAG Workflow Visualiser

Watch the Retriever → Critic → Generator pipeline animate in real-time. Click ▾ on any completed node to inspect its thought log and tool calls.

Node Roles

Retriever

Fetches top-K chunks via vector + BM25 search

Critic

Scores relevance; decides re-query or proceed

Generator

Builds prompt from context; calls LLM; returns answer

Retriever

Waiting…

↓

Critic

Waiting…

↓

Generator

Waiting…

Agentic RAG Loop — Architecture Reference

User Query
→
Query Router
→
Vector DB (Dense)
+
BM25 Index (Sparse)
→
RRF Merger
→
Critic
→
LLM Generator
→
Response
The Critic can trigger a re-query loop (up to N iterations) before passing context to the Generator — this is the key difference from standard single-pass RAG.
Part 3·

RAGAS Eval Lab

Upload a .txt or .pdf file (or paste text). We simulate QA-pair generation and score your RAG pipeline on the three core RAGAS metrics.

Click to upload .txt or .pdf

or paste text directly below

Scorecard will appear here

Upload or paste text, then click evaluate

RAGAS Metrics — Course Reference

Faithfulness

Measures hallucination. Low score = model invents facts not present in retrieved context.

Formula: Claims supported by context ÷ Total claims in answer

Range: 0 – 1

Target: ≥ 0.85

Answer Relevancy

Measures on-topic quality. Penalises incomplete or off-topic answers.

Formula: Mean cosine similarity of back-generated questions to original query

Range: 0 – 1

Target: ≥ 0.80

Context Precision

Measures retrieval precision. Low score = too much noise in the retrieved context.

Formula: Relevant chunks in top-K ÷ Total K retrieved

Range: 0 – 1

Target: ≥ 0.75