WeKnora: Turn Your Document Pile into an AI-Powered Knowledge Librarian
Ever wished you could Ctrl+F an entire folder of PDFs and ask follow-up questions like “What does Section 3.2 actually mean?”
WeKnora lets you do exactly that—without writing a single line of code.
What Is WeKnora?
WeKnora (pronounced wee-KNOW-ra) is an open-source framework that reads, understands, and retrieves answers from complex documents. It combines large-language-model reasoning with a retrieval pipeline so you can chat with files instead of scrolling through them.
Key idea in one sentence:
Upload any mix of PDFs, Word docs, images, or slides and ask questions in plain English—or Chinese. The system finds the most relevant snippets and explains them in context.
Architecture at a Glance
graph LR
A[Raw Documents] -->|Parsing| B(Text & Images)
B -->|Embedding| C(Vector Index)
C -->|Retrieve| D(Top Snippets)
D -->|Generate| E(Natural Answer)
-
Parsing Layer extracts text, tables, and OCRed words. -
Embedding Layer turns every paragraph into a dense vector. -
Retrieval Layer mixes keyword, vector, and knowledge-graph search. -
Generation Layer feeds the best snippets to a large language model and returns a concise answer with page references.
Core Features
Feature | Everyday Benefit | Technical Label |
---|---|---|
Reads any format | Drag in PDFs, scans, or Word docs—no reformatting | Multi-modal document ingestion |
Understands context | Ask “Why did revenue drop in Q3?” and get the paragraph that explains it | Retrieval-augmented generation (RAG) |
Plays well with others | Swap out vector DB or model with one line in .env |
Modular, plug-and-play design |
Runs offline | Keep sensitive contracts on your own servers | Private cloud & on-prem installs |
No-code UI | Point, click, chat | Web dashboard + REST API |
Use-Case Map
Who | Pain Point | After WeKnora |
---|---|---|
HR Manager | On-boarding docs scattered across drives | New hires ask the chatbot “How do I apply for leave?” and get the exact policy line |
Graduate Student | 200-page theses to review | Type “Summarize the methodology of paper #17” and receive a bullet list with page numbers |
Support Engineer | Same tech question 20× a day | Users self-serve: “Error code 0x42” → step-by-step fix from the manual |
Legal Analyst | Find every indemnity clause in 500 contracts | Bulk search returns clauses ranked by similarity |
Clinician | Rapid guideline updates | Ask “Latest hypertension threshold 2025” and get the exact guideline paragraph |
Supported File Types & Tech Stack
Component | Works With | Notes |
---|---|---|
Document formats | PDF, DOCX, TXT, MD, PNG, JPG | OCR + layout analysis included |
Embedding models | Local BGE, GTE, or any OpenAI-compatible API | Custom models welcome |
Vector stores | PostgreSQL + pgvector, Elasticsearch | Switch via config file |
Retrieval strategies | BM25, dense vector, knowledge-graph | Combine or run separately |
Large language models | Qwen, DeepSeek, or any Ollama model | “Think” vs “non-think” modes |
Deployment | Docker Compose or bare metal | One command start/stop |
Interfaces | Web UI + REST endpoints | Embed in existing apps |
Quick Start: Five Minutes from Clone to First Question
1. Prerequisites
-
✦ Docker & Docker Compose installed -
✦ Git for cloning the repo -
✦ (Optional) GPU for faster inference, but CPU works
2. Clone & Launch
# Clone the repository
git clone https://github.com/Tencent/WeKnora.git
cd WeKnora
# Copy environment template
cp .env.example .env
# Edit .env if you need custom ports or external models
# Start everything
./scripts/start_all.sh
# or
make start-all
3. Open Your Browser
Service | URL | Purpose |
---|---|---|
Web UI | http://localhost | Upload & chat |
API | http://localhost:8080 | Integrate with other tools |
Tracing | http://localhost:16686 | Debug retrieval steps |
4. Upload Your First Document
-
✦ Drag a PDF into the Knowledge Upload zone -
✦ Watch the status change: Parsing → Embedding → Done -
✦ A 10-page paper usually finishes in ~30 seconds on modern laptops
5. Ask a Question
Type: “What are the main contributions of this paper?”
The system returns:
-
✦ A concise answer -
✦ Exact page numbers -
✦ Thumbnail preview of the source paragraph
Using WeKnora Inside WeChat (Zero-Code Path)
If you prefer not to self-host, the same engine powers the official WeChat Conversation Platform:
-
Visit chatbot.weixin.qq.com -
Create a bot → select Knowledge Q&A -
Upload your documents; WeKnora handles the rest -
Embed the bot into your WeChat Official Account or Mini-Program
Knowledge Graph Visualization
Enable the graph view to see how paragraphs relate:
Hover over a node to jump to the original paragraph; use the graph to discover hidden connections across documents.
Developer Notes
Folder Map
WeKnora/
├── cmd/ # Entry points for each service
├── internal/ # Core business logic
├── config/ # YAML/ENV configuration
├── migrations/ # Database schema
├── scripts/ # One-line start/stop helpers
├── services/ # Retrieval, LLM, OCR micro-services
├── frontend/ # Vue-based web UI
└── docs/ # OpenAPI & user guides
Daily Commands
# Stop all containers
make stop-all
# Reset the vector index (dev only)
make clean-db
# Tail logs for the LLM service
docker compose logs -f llm
Contributing
-
Fork the repo -
Create a feature branch: git checkout -b feat/better-ocr
-
Write tests, run gofmt
, commit with Conventional Commits -
Open a Pull Request
Real-World Mini-Case Studies
Case 1 – Investment Bank Compliance Team
Challenge
Review 2,000 asset-management contracts every quarter for risk-disclosure clauses.
Solution
-
✦ Batch-upload PDFs to WeKnora -
✦ Create prompt template: “Extract risk-disclosure clause and list three key points” -
✦ Run overnight; results exported to CSV -
✦ Result: 3 staff-days reduced to 30 minutes.
Case 2 – University Research Lab
Challenge
New PhD students must read 100+ deep-learning papers.
Solution
-
✦ Papers uploaded to WeKnora -
✦ WeChat bot integrated into lab group -
✦ Students ask: “How does Fig-4 reproduce the results?” and receive step-by-step guidance with page references.
Case 3 – Manufacturing Support Desk
Challenge
8000-page equipment manual; support agents spend 5–10 min per query.
Solution
-
✦ Manual split into sections and ingested -
✦ Agent types customer symptom: “Motor noise at 3000 rpm” -
✦ WeKnora returns: “See §5.3.2, Fig 5-7: Bearing lubrication check” -
✦ Result: Average handling time drops to 90 seconds.
Frequently Asked Questions (FAQ)
Q1: Do I need a GPU?
A: Not mandatory. A 4-core CPU can run Qwen-7B with acceptable latency; add an 8 GB GPU for faster responses.
Q2: Is my data safe?
A: Yes. In offline mode, nothing leaves your machine. Docker images can be pulled, then run without internet.
Q3: Can it read Chinese contracts with tables?
A: Absolutely. Tables are parsed into Markdown, embedded, and referenced down to “Table 2-1, row 3”.
Q4: How do I integrate it with my existing CRM?
A: Call the REST API at http://localhost:8080/api/v1/query
; responses are JSON with answer, confidence, page, and snippet.
Q5: How do I update the knowledge base?
A: Upload a new version via the web UI. Same file names overwrite old vectors automatically.
Q6: Does it support user roles?
A: The open-source edition has basic login. Enterprise builds can plug into LDAP or OAuth2.
Q7: Retrieval seems off—what should I tweak?
A: Open Jaeger at http://localhost:16686
to see which snippets were retrieved. Adjust BM25 weight or swap the embedding model in .env
.
Q8: Can I search titles only?
A: Yes. Increase title_weight
in the retrieval config to prioritize headings.
Q9: How big is the Docker image?
A: Around 6 GB with Ollama and a 7 B model included. If you host the model elsewhere, the core image shrinks to ~1.2 GB.
Q10: Commercial use allowed?
A: MIT license—free for commercial use as long as you keep the original copyright notice.
Next Steps & Advanced Tips
-
✦ Fine-tune embeddings: Train a domain-specific model on your documents to boost retrieval accuracy by 5–15 %. -
✦ Connect to Slack/Teams: Use outgoing webhooks to pipe questions and answers into your favorite chat platform. -
✦ Create an offline demo USB: Package Docker, model, and UI onto a 32 GB stick—plug into any laptop for instant demos.
Final Thoughts
WeKnora turns static documents into living knowledge. Whether you are an engineer tired of flipping through manuals, a student buried in papers, or a legal analyst chasing clauses, the workflow is the same:
-
Drop files in. -
Ask in plain language. -
Get precise answers with sources.
Ready to try? Open your terminal and run:
git clone https://github.com/Tencent/WeKnora.git
cd WeKnora
./scripts/start_all.sh
Upload your first PDF and ask it a question—you’ll wonder how you ever worked without it.