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.
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:
- Computes the embedding centroid of each document (average of all its chunks)
- Compares each document pair with cosine similarity
- 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)
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 accountRelated articles
What is RAG? Retrieval-Augmented Generation Explained
Discover how RAG combines intelligent search with generative AI to deliver accurate answers with verifiable sources.
Read article → TechnologyEmbeddings and Semantic Search: How Context-Aware AI Works
Understand how embeddings transform text into vectors to find information by meaning, not exact words.
Read article → TechnologySmart Routing: Automatic Knowledge Base Selection with Embeddings
How Citai automatically selects the best knowledge base for each question using embedding centroids and cosine similarity.
Read article →