Tencent Open-Sources WeKnora: LLM Document Understanding & Search Framework
Tencent open-sources WeKnora, a modular RAG framework that combines multimodal document parsing, hybrid retrieval (keyword, vector, knowledge graph), and agent-based reasoning to enable semantic search and Q&A over complex documents, with support for local deployment and flexible model integration.
Introduction
WeKnora is an open-source document understanding and semantic search framework built on large language models (LLMs), designed for structurally complex and content-rich documents. It adopts a modular architecture that fuses multimodal segmentation, semantic cognitive indexing, intelligent perception, and LLM-based generative reasoning to create an efficient, controllable document Q&A pipeline. Based on Retrieval-Augmented Generation (RAG), it combines context-relevant fragments with language models for higher-quality semantic answers.
Core Features
Agent Mode: Supports ReACT Agent mode, calling built-in tools for knowledge base retrieval, MCP tools, and web search, iterating and reflecting to produce comprehensive summary reports.
Precise Understanding: Extracts structured content from PDF, Word, images, and other documents, building a unified semantic view.
Intelligent Reasoning: Leverages LLMs to understand document context and user intent, enabling precise Q&A and multi-turn dialogue.
Multiple Knowledge Base Types: Supports FAQ and document knowledge bases, with folder import, URL import, tag management, and online entry.
Flexible Extension: Decouples the full pipeline from parsing, embedding, retrieval to generation, allowing flexible integration and customization.
Efficient Retrieval: Hybrid retrieval strategies combining keyword, vector, and knowledge graph search, with cross-knowledge-base retrieval support.
Web Search: Extensible web search engines, with built-in DuckDuckGo.
MCP Tool Integration: Extends Agent capabilities via MCP, with built-in uvx and npx launch tools, supporting multiple transport methods.
Dialogue Strategy: Configurable Agent model, normal mode model, retrieval threshold, and prompt for precise control of multi-turn dialogue behavior.
Simple and Usable: Intuitive Web UI and standard API for zero-barrier quick start.
Secure and Controllable: Supports local and private cloud deployment, with full data autonomy.
Technical Architecture
WeKnora uses a modern modular architecture that clearly decouples the document understanding and retrieval pipeline, consisting of five layers:
Document Processing Layer: Parses and preprocesses multi-format documents (PDF, Word, images, etc.).
Knowledge Modeling Layer: Builds deep knowledge representations through vectorization, chunking, and knowledge graph techniques.
Retrieval Engine Layer: Innovatively fuses keyword, vector, and knowledge graph retrieval strategies for efficient and precise recall.
Reasoning Generation Layer: Uses LLMs for deep understanding and answer generation, integrated with Agent reasoning capabilities.
Interaction Presentation Layer: Provides an intuitive Web UI and standard API.
This design offers high flexibility: retrieval strategies, LLMs (supports Ollama, allowing switching between Qwen, DeepSeek, and other mainstream models), and vector databases can be freely combined. The end-to-end design ensures controllability, supporting private deployment with full data autonomy. Since v0.1.3, login authentication has been added; official recommendation is to deploy the service in an intranet environment with proper firewall configuration for security.
Quick Start
Environment Requirements
Docker
Docker Compose
Git
Installation Steps
1. Clone the repository:
# Clone main repository
git clone https://github.com/Tencent/WeKnora.git
cd WeKnora2. Configure environment variables:
# Copy example config file
cp .env.example .env
# Edit .env with corresponding configuration
# All variable descriptions in .env.example comments3. Start services (including Ollama):
Check the .env file for required images. ./scripts/start_all.sh Or: make start-all 4. Stop services:
./scripts/start_all.sh --stop
# or
make stop-allService Access URLs
Web UI: http://localhost Backend API: http://localhost:8080 Distributed Tracing (Jaeger):
http://localhost:16686Feature Showcase
Web UI Interface
Knowledge Base Management
Dialogue Settings
Agent Mode Tool Invocation Process
Open Source Repository
https://github.com/Tencent/WeKnora
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
macrozheng
Dedicated to Java tech sharing and dissecting top open-source projects. Topics include Spring Boot, Spring Cloud, Docker, Kubernetes and more. Author’s GitHub project “mall” has 50K+ stars.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
