DeepWiki Open vs SOTA - chunhualiao/public-docs GitHub Wiki
DeepWiki-Open:diagram generation vs SOTA
Looking at your question about whether DeepWiki's question answering design is state-of-the-art, I can analyze the current implementation and compare it to modern best practices .
DeepWiki implements a fairly standard RAG (Retrieval Augmented Generation) architecture with these components:
RAG Implementation: The system uses FAISS for vector similarity search with code embeddings stored locally in ~/.adalflow/databases/
1 . Documents are validated for consistent embedding sizes and grouped by file path for context formatting 2 .
Multi-Provider Support: The architecture supports multiple AI providers (Google Gemini, OpenAI, OpenRouter, Ollama, Azure) through a unified interface 3 .
Streaming Responses: Both HTTP and WebSocket endpoints provide real-time streaming responses 4 5 .
Not Quite State-of-the-Art: While DeepWiki's design is solid and functional, it lacks several modern RAG improvements:
-
Hybrid Search: Modern systems combine dense (vector) and sparse (keyword) retrieval. DeepWiki only uses FAISS vector search.
-
Reranking: No cross-encoder reranking of retrieved documents for better relevance.
-
Query Decomposition: Complex queries aren't broken down into sub-queries for better retrieval.
-
Contextual Compression: Retrieved documents aren't compressed to remove irrelevant parts.
Hybrid Search: Combining dense embeddings with sparse retrieval (BM25) typically improves retrieval quality by 15-30%.
Multi-Vector Retrieval: Using different embedding models for different content types (code vs documentation vs comments).
Hierarchical Retrieval: First retrieving at file/class level, then drilling down to specific functions.
Query Rewriting: Automatically expanding or reformulating user queries for better retrieval.
Multi-Query Generation: Creating multiple variations of the same query to capture different aspects.
Contextual Query Expansion: Using conversation history to enhance current queries.
Retrieval-Augmented Fine-tuning: Fine-tuning models specifically for code Q&A tasks.
Chain-of-Thought Prompting: More structured reasoning in prompts (DeepWiki has basic versions in Deep Research).
Self-Reflection: Having models evaluate and improve their own responses.
Agentic RAG: Using LLM agents to decide when and how to retrieve information.
Graph-Enhanced RAG: Incorporating code structure graphs (AST, call graphs) alongside vector search.
Adaptive Retrieval: Dynamically adjusting retrieval strategies based on query type.
-
Add Hybrid Search: Combine FAISS with BM25 for better retrieval coverage.
-
Implement Reranking: Add a cross-encoder model to rerank retrieved documents.
-
Code Structure Awareness: Incorporate AST parsing and call graph information.
-
Query Classification: Route different types of queries (API usage, architecture, debugging) to specialized retrieval strategies.
-
Contextual Compression: Summarize or filter retrieved documents to focus on relevant parts.
DeepWiki's current design is functional and covers the basics well, but it represents more of a "RAG 1.0" approach. The field has evolved significantly with techniques like hybrid search, agentic workflows, and graph-enhanced retrieval becoming standard in production systems. The multi-provider support and streaming capabilities are good architectural choices that would support these enhancements.
Wiki pages you might want to explore: