Skip to main content

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​

BenefitDescription
Grounded ResponsesAI answers based on your documents
Source CitationsEvery answer includes references to source documents
Smart ChunkingAutomatic document splitting optimized for retrieval
Flexible RetrievalVector, keyword, or hybrid search modes

πŸ†• Creating Knowledge Bases​

Step 1: Navigate to Knowledge Base​

  1. Log in to Wegent
  2. Navigate to Knowledge Base section in the sidebar
  3. Click Create Knowledge Base

Step 2: Choose Knowledge Base Type​

TypeDocument LimitChat SupportBest For
Notebook50 documentsβœ… YesInteractive research, Q&A sessions
ClassicUnlimited❌ NoLarge document collections, archives

See Knowledge Base Types for detailed comparison.

Step 3: Configure Basic Settings​

FieldDescriptionExample
NameDisplay name (1-100 chars)"Product Documentation"
DescriptionOptional description (max 500 chars)"Internal product docs and guides"

Step 4: Configure Retrieval Settings​

SettingOptionsDescription
Retrieval ModeVector / Keyword / HybridSearch method
top_k1-10 (default: 5)Number of results
score_threshold0.0-1.0 (default: 0.7)Minimum relevance score

Step 5: Upload Documents​

  1. Click Add Document
  2. Choose source type (File / Text / URL / External Table)
  3. Configure chunking settings (optional)
  4. Click Upload

πŸ“„ Document Management​

Supported Sources​

SourceDescription
File UploadUpload from local computer
Text PastePaste text content directly
External TableImport from DingTalk/Feishu
Web ScrapingScrape 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​

StrategyBest ForDescription
Smart ChunkingGeneral documentsAuto-detect structure
Sentence-basedFAQ, Q&A contentSplit by sentence boundaries
SemanticLong articlesSplit by semantic similarity

Key Parameters​

ParameterRangeDefaultDescription
chunk_size128-8192500Characters per chunk
chunk_overlap0-204850Overlapping characters

See Chunking Strategies for detailed guide.


πŸ” Retrieval Test​

Before saving retrieval configuration, you can test the retrieval effectiveness.

How to Use​

  1. Go to Knowledge Base Retrieval Settings
  2. Configure retrieval parameters
  3. Enter a test query in the Retrieval Test area
  4. Click Test button
  5. Review returned chunks and relevance scores
  6. Adjust parameters based on results
  7. Click Save when satisfied

πŸ“ Summary Features​

Document Summaries​

When enabled, the system automatically generates summaries for each document:

  1. Document is uploaded and indexed
  2. Summary model processes content
  3. Summary stored with document metadata
  4. Available for quick reference

Knowledge Base Summary​

Generate an aggregate summary of the entire Knowledge Base:

  1. Navigate to Knowledge Base settings
  2. Click Generate Summary
  3. View combined summary of all documents

Summary Retry​

If summary generation fails:

  1. Find the document with failed summary
  2. Click Retry Summary button
  3. System will attempt to regenerate

πŸ€– Integration with Agents​

Selecting Knowledge Base in Chat​

  1. Click the context selector near the chat input
  2. Select Knowledge Base from options
  3. Choose your desired Knowledge Base
  4. Send your question

Notebook Mode Chat​

In Notebook mode, you can chat directly within the Knowledge Base:

  1. Open a Notebook-type Knowledge Base
  2. Use the chat panel on the right
  3. Select specific documents for context (optional)
  4. 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​

  1. Click on a citation number in the response
  2. View the original chunk content
  3. See surrounding context
  4. Navigate to full document if needed

❓ Troubleshooting​

Upload Issues​

ProblemSolution
File upload failsCheck file size (max 50MB) and format
Document stuck in "Processing"Wait for large documents or re-upload

Retrieval Issues​

ProblemSolution
No results returnedLower score_threshold or try different query
Irrelevant resultsReduce chunk_size or try hybrid mode

πŸ’‘ Best Practices​

Document Organization​

PracticeDescription
Meaningful namesUse descriptive document names
Consistent formatStandardize document formatting
Regular updatesRe-index when documents change
Clean contentRemove irrelevant headers/footers

Retrieval Tuning​

ScenarioModetop_kthreshold
Precise answersVector3-50.8
Broad searchHybrid8-100.6
Exact matchingKeyword50.7