Knowledge Base Guide
Knowledge Base enables you to store, organize, and retrieve documents for RAG (Retrieval-Augmented Generation), allowing AI agents to answer questions based on your specific documents.
π― Overviewβ
What is Knowledge Base?β
Knowledge Base is a document storage and retrieval system that enables RAG. It allows AI agents to search through your documents and provide answers grounded in your specific content.
Core Benefitsβ
| Benefit | Description |
|---|---|
| Grounded Responses | AI answers based on your documents |
| Source Citations | Every answer includes references to source documents |
| Smart Chunking | Automatic document splitting optimized for retrieval |
| Flexible Retrieval | Vector, keyword, or hybrid search modes |
π Creating Knowledge Basesβ
Step 1: Navigate to Knowledge Baseβ
- Log in to Wegent
- Navigate to Knowledge Base section in the sidebar
- Click Create Knowledge Base
Step 2: Choose Knowledge Base Typeβ
| Type | Document Limit | Chat Support | Best For |
|---|---|---|---|
| Notebook | 50 documents | β Yes | Interactive research, Q&A sessions |
| Classic | Unlimited | β No | Large document collections, archives |
See Knowledge Base Types for detailed comparison.
Step 3: Configure Basic Settingsβ
| Field | Description | Example |
|---|---|---|
| Name | Display name (1-100 chars) | "Product Documentation" |
| Description | Optional description (max 500 chars) | "Internal product docs and guides" |
Step 4: Configure Retrieval Settingsβ
| Setting | Options | Description |
|---|---|---|
| Retrieval Mode | Vector / Keyword / Hybrid | Search method |
| top_k | 1-10 (default: 5) | Number of results |
| score_threshold | 0.0-1.0 (default: 0.7) | Minimum relevance score |
Step 5: Upload Documentsβ
- Click Add Document
- Choose source type (File / Text / URL / External Table)
- Configure chunking settings (optional)
- Click Upload
π Document Managementβ
Supported Sourcesβ
| Source | Description |
|---|---|
| File Upload | Upload from local computer |
| Text Paste | Paste text content directly |
| External Table | Import from DingTalk/Feishu |
| Web Scraping | Scrape content from URL |
Supported Formatsβ
.txt- Plain text files.md- Markdown files.pdf- PDF documents.doc,.docx- Word documents
See Document Management for detailed guide.
πͺ Chunking Strategiesβ
Available Strategiesβ
| Strategy | Best For | Description |
|---|---|---|
| Smart Chunking | General documents | Auto-detect structure |
| Sentence-based | FAQ, Q&A content | Split by sentence boundaries |
| Semantic | Long articles | Split by semantic similarity |
Key Parametersβ
| Parameter | Range | Default | Description |
|---|---|---|---|
| chunk_size | 128-8192 | 500 | Characters per chunk |
| chunk_overlap | 0-2048 | 50 | Overlapping characters |
See Chunking Strategies for detailed guide.
π Retrieval Testβ
For smaller knowledge bases, the system may also use an all-chunks direct injection path to load the full chunk set into the model. This exists mainly to compensate for cases where vector retrieval recall is not stable enough.
See Retrieval And Direct Injection for the design rationale and permission model.
Before saving retrieval configuration, you can test the retrieval effectiveness.
How to Useβ
- Go to Knowledge Base Retrieval Settings
- Configure retrieval parameters
- Enter a test query in the Retrieval Test area
- Click Test button
- Review returned chunks and relevance scores
- Adjust parameters based on results
- Click Save when satisfied
π Summary Featuresβ
Document Summariesβ
When enabled, the system automatically generates summaries for each document:
- Document is uploaded and indexed
- Summary model processes content
- Summary stored with document metadata
- Available for quick reference
Knowledge Base Summaryβ
Generate an aggregate summary of the entire Knowledge Base:
- Navigate to Knowledge Base settings
- Click Generate Summary
- View combined summary of all documents
Summary Retryβ
If summary generation fails:
- Find the document with failed summary
- Click Retry Summary button
- System will attempt to regenerate
π€ Integration with Agentsβ
Selecting Knowledge Base in Chatβ
- Click the context selector near the chat input
- Select Knowledge Base from options
- Choose your desired Knowledge Base
- Send your question
Notebook Mode Chatβ
In Notebook mode, you can chat directly within the Knowledge Base:
- Open a Notebook-type Knowledge Base
- Use the chat panel on the right
- Select specific documents for context (optional)
- Ask questions about your documents
π Citations and Referencesβ
Citation Formatβ
AI responses include numbered citations linking to source documents:
Based on your product documentation [1], the feature works by...
Additionally, the troubleshooting guide [2] suggests...
Sources:
[1] product-overview.pdf (Section 3)
[2] troubleshooting-guide.md (Chunk 15)
Viewing Source Contentβ
- Click on a citation number in the response
- View the original chunk content
- See surrounding context
- Navigate to full document if needed
β Troubleshootingβ
Upload Issuesβ
| Problem | Solution |
|---|---|
| File upload fails | Check file size (max 50MB) and format |
| Document stuck in "Processing" | Wait for large documents or re-upload |
Retrieval Issuesβ
| Problem | Solution |
|---|---|
| No results returned | Lower score_threshold or try different query |
| Irrelevant results | Reduce chunk_size or try hybrid mode |
π‘ Best Practicesβ
Document Organizationβ
| Practice | Description |
|---|---|
| Meaningful names | Use descriptive document names |
| Consistent format | Standardize document formatting |
| Regular updates | Re-index when documents change |
| Clean content | Remove irrelevant headers/footers |
Retrieval Tuningβ
| Scenario | Mode | top_k | threshold |
|---|---|---|---|
| Precise answers | Vector | 3-5 | 0.8 |
| Broad search | Hybrid | 8-10 | 0.6 |
| Exact matching | Keyword | 5 | 0.7 |
π Related Resourcesβ
- Knowledge Base Types - Notebook vs Classic comparison
- Document Management - Adding and managing documents
- Chunking Strategies - Document chunking options
- Configuring Retrievers - Retrieval configuration