Vasanth6 commited on
Commit
137b48f
Β·
1 Parent(s): f35d149

Add Visualizer and Grand Arena GIFs to README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -6
README.md CHANGED
@@ -4,6 +4,8 @@
4
 
5
  RAG Visualizer is an interactive, local-first tool that lets you **see** what happens inside a RAG pipeline β€” from how your text gets chunked, to how those chunks land in vector space, to which chunks get retrieved for a given query. No cloud APIs, no black boxes. Everything runs on your machine with local Ollama models.
6
 
 
 
7
  ---
8
 
9
  ## ✨ Features
@@ -38,11 +40,20 @@ Visualize and compare **5 chunking strategies** side-by-side:
38
  - **Sonar Probe** β€” click anywhere on the canvas to find the nearest chunks by 2D proximity
39
  - **Document X-Ray Highlighting** β€” retrieved chunks glow in the original text with rank-based styling (gold for Rank 1, dashed for Rank 2, dotted for Rank 3)
40
 
41
- ### πŸ“ Phase 4 β€” Adaptive Thresholding
 
 
 
 
 
 
 
42
 
43
- - Semantic chunking uses a **gradient derivative method** instead of a static threshold
44
- - Computes mean + z-score-scaled standard deviation of inter-sentence embedding distances
45
- - The slider controls the z-score multiplier, making the boundary detection adaptive to each document's unique distribution
 
 
46
 
47
  ---
48
 
@@ -264,9 +275,40 @@ Embeds a query and retrieves the top-K most similar chunks from ChromaDB.
264
 
265
  **Response:** `QueryResponse` with query coordinates, retrieved chunks, and distance scores.
266
 
267
- ### `GET /api/strategies`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
268
 
269
- Returns the list of available chunking strategies.
270
 
271
  ---
272
 
 
4
 
5
  RAG Visualizer is an interactive, local-first tool that lets you **see** what happens inside a RAG pipeline β€” from how your text gets chunked, to how those chunks land in vector space, to which chunks get retrieved for a given query. No cloud APIs, no black boxes. Everything runs on your machine with local Ollama models.
6
 
7
+ ![RAG Visualizer Demo](assets/x_ray-visualizer.gif)
8
+
9
  ---
10
 
11
  ## ✨ Features
 
40
  - **Sonar Probe** β€” click anywhere on the canvas to find the nearest chunks by 2D proximity
41
  - **Document X-Ray Highlighting** β€” retrieved chunks glow in the original text with rank-based styling (gold for Rank 1, dashed for Rank 2, dotted for Rank 3)
42
 
43
+ ### βš”οΈ Phase 3.2 β€” LLM-as-a-Judge (The Grand Arena)
44
+
45
+ - **Side-by-Side Comparison** β€” Compare retrieval results from two different models/strategies in a split-screen arena
46
+ - **AI Referee** β€” Call upon a local Ollama model to evaluate, rank, and score retrieved contexts
47
+ - **Multi-Dimensional Scorecard** β€” Referee grades chunks on Relevance, Completeness, Factual Plausibility, and Clarity
48
+ - **Pydantic Validator Guardrails** β€” Validates the referee's output to catch and override arithmetic lies and position bias
49
+
50
+ ![Grand Arena Comparison](assets/arena_comparison.gif)
51
 
52
+ ### πŸ“ Phase 4 β€” Adaptive Thresholding (Gradient Fix)
53
+
54
+ - Semantic chunking uses an **adaptive gradient derivative / peak detection** algorithm instead of a static threshold split
55
+ - Computes the dynamic threshold based on document-wide mean and standard deviation of inter-sentence embedding distances
56
+ - Uses local maxima peak detection to prevent fragmenting paragraphs, ensuring splits only happen at true topic shift peaks
57
 
58
  ---
59
 
 
275
 
276
  **Response:** `QueryResponse` with query coordinates, retrieved chunks, and distance scores.
277
 
278
+ ### `POST /api/compare`
279
+
280
+ Compares retrieval results from two different configurations side-by-side.
281
+
282
+ **Request Body:**
283
+
284
+ ```json
285
+ {
286
+ "search_text": "query",
287
+ "top_k": 3,
288
+ "model_a": "nomic-embed-text",
289
+ "strategy_a": "fixed_size",
290
+ "model_b": "EmbeddingGemma",
291
+ "strategy_b": "semantic"
292
+ }
293
+ ```
294
+
295
+ **Response:** `CompareResponse` containing results from both configuration A and configuration B.
296
+
297
+ ### `POST /api/judge`
298
+
299
+ Submits retrieval results to a local LLM judge for evaluation and scoring.
300
+
301
+ **Request Body:**
302
+
303
+ ```json
304
+ {
305
+ "search_query": "query",
306
+ "chunk_a": "text of chunk a",
307
+ "chunk_b": "text of chunk b"
308
+ }
309
+ ```
310
 
311
+ **Response:** `JudgeResponse` with winner declaration, confidence, scorecards, strengths, and weaknesses.
312
 
313
  ---
314