Tencent Open-Sources WeKnora: RAG Framework for Complex Document Understanding
Tencent has open-sourced WeKnora, a RAG-based framework for understanding and semantically searching complex documents like PDFs and Word files, offering Agent-mode reasoning, hybrid retrieval, MCP tool integration, and private deployment, with over 36k GitHub stars.
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 enables users to move from manual document searching to natural language questioning. The project has garnered over 36,000 stars on GitHub.
Core Features
Agent Mode: Supports ReACT Agent mode, allowing the agent to call 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 PDFs, Word documents, images, and other formats, building a unified semantic view.
Intelligent Reasoning: Leverages LLMs to understand document context and user intent, supporting accurate Q&A and multi-turn conversations.
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, enabling 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 engine with built-in DuckDuckGo integration.
MCP Tool Integration: Extends agent capabilities via MCP, with built-in uvx and npx launch tools supporting multiple transport methods.
Conversation Strategy: Configurable agent model, normal mode model, retrieval threshold, and prompt for precise control of multi-turn dialogue behavior.
Simple and Easy to Use: Intuitive web UI and standard APIs for zero-barrier quick start.
Secure and Controllable: Supports on-premise and private cloud deployment with full data sovereignty.
Technical Architecture
WeKnora adopts a modern modular architecture that cleanly decouples the document understanding and retrieval pipeline:
Document Processing Layer: Handles parsing and preprocessing of multi-format documents (PDF, Word, images, etc.).
Knowledge Modeling Layer: Builds deep knowledge representations through vectorization, chunking, and knowledge graph technologies.
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 Display Layer: Provides an intuitive web interface and standard APIs.
This design offers high flexibility: retrieval strategies, LLMs (supports Ollama with switchable models like Qwen, DeepSeek), and vector databases can be freely combined. The end-to-end design ensures controllability and supports private deployment. Since v0.1.3, login authentication has been added; official recommendation is to deploy inside an intranet with proper firewall configuration.
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 your configuration
# All variable descriptions are 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
After successful startup, access:
Web UI: http://localhost Backend API: http://localhost:8080 Distributed Tracing (Jaeger):
http://localhost:16686Function Demonstration
Web UI Interface
Knowledge Base Management
Conversation Settings
Agent Mode Tool Calling Process
Open Source Address
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.
SpringMeng
Focused on software development, sharing source code and tutorials for various systems.
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.
