Chapter 03 – Knowledge Base System Overview 🟡 BETA

This chapter explains how botserver manages knowledge base collections, indexing, caching, semantic search, and conversation memory. The implementation uses vector databases for semantic search and intelligent memory management for context optimization.

DocumentFileDescription
READMEREADME.mdHigh-level reference for the .gbkb package and its core commands (USE KB, CLEAR KB, USE WEBSITE).
KB and Toolskb-and-tools.mdIntegration patterns for knowledge bases and tool systems.
Vector Collectionsvector-collections.mdDefinition and management of vector collections, including creation, document addition, and usage in dialogs.
Document Indexingindexing.mdProcess of extracting, chunking, embedding, and storing document vectors in the VectorDB.
Retrieval and RAGhybrid-search.mdThe retrieval pipeline: dense search, keyword fusion, the six modes and their limits.
Episodic Memoryepisodic-memory.mdAutomatic conversation history management, context compaction, and intelligent summarization.
Semantic Cachingcaching.mdIntelligent caching for LLM responses, including semantic similarity matching.

Key Configuration Parameters

Knowledge Base

ParameterDefaultDescription
embedding-urlhttp://localhost:8082Embedding service endpoint
embedding-modelbge-small-en-v1.5Model for vector embeddings
rag-modestandardRetrieval strategy: standard, hybrid, corrective, graph, agentic, multimodal

Episodic Memory

ParameterDefaultDescription
episodic-memory-enabledtrueEnable/disable episodic memory
episodic-memory-threshold4Exchanges before compaction
episodic-memory-history2Recent exchanges to keep
episodic-memory-modelfastModel for summarization
episodic-memory-max-episodes100Max episodes per user
episodic-memory-retention-days365Days to keep episodes
episodic-memory-auto-summarizetrueAuto-summarize conversations

LLM Cache

ParameterDefaultDescription
llm-cachefalseEnable/disable response caching
llm-cache-ttl3600Cache time-to-live in seconds
llm-cache-semantictrueUse semantic similarity matching
llm-cache-threshold0.95Similarity threshold for cache hits

How to Use This Overview

  • Navigate: Click the file links to read the full documentation for each topic.
  • Reference: Use the parameter tables for quick configuration lookup.
  • Update: When the underlying implementation changes, edit the corresponding markdown files and keep this summary in sync.

See Also