ProductApril 10, 2026·7 min read

Knowledge Graph: visualize your RAG pipeline as a neural map

Citai Team

April 10, 2026 · 7 min read

The problem: RAG debugging is abstract

When optimizing a RAG pipeline, results come as score tables and chunk lists. Why does this chunk have a 0.92 score? Why doesn’t that document appear? Is there redundancy in your knowledge base? Tables don’t tell the full story.

Knowledge Graph transforms that data into an interactive graph where every relationship is visible, touchable, and understandable in seconds.

Query Graph: your question at the center

The Query Graph mode places your query as a blue diamond at the center. Retrieved chunks orbit around it as circular nodes:

  • Distance from center = inversely proportional to relevance score
  • Node size = proportional to cross-encoder rerank score
  • Color = grouped by source document (same source = same color)
  • Labels on lines = numeric score of each connection

What it reveals

A quick glance tells you:

  • If all nodes share the same color → your KB has only one relevant document for that topic
  • If there are large nodes far from center → the reranker scored them high but vector search didn’t
  • If you enable “Show filtered chunks” → you see semi-transparent nodes the pipeline discarded

Detail panel

Click any node to open a side panel with scores from each stage: Vector, BM25, RRF Merge, Rerank, and Final MMR. This lets you diagnose exactly where a chunk gained or lost relevance.

KB Map: X-ray of your knowledge

The second mode, KB Map, operates at the document level:

  1. Computes the embedding centroid of each document (average of all its chunks)
  2. Compares each document pair with cosine similarity
  3. Shows only connections that exceed the similarity threshold you configure

What it reveals

  • Dense clusters = documents covering the same topic → possible redundancy
  • Isolated nodes (no connections) = documents whose content doesn’t relate to anything → topic gaps
  • Large nodes = documents with many chunks (more content)
Tip: Lower the similarity threshold to 0.3 to see all weak relationships. Raise it to 0.8+ to see only the strongest connections. Nodes that disappear when raising the threshold are candidates for review.

How to access

Admin > RAG Playground > "Graph" mode

Two sub-tabs: Query Graph (requires running a query) and KB Map (select a KB and generate the map).

Try Citai for free

Create your intelligent knowledge base in minutes. No credit card required.

Create free account