botbook/src/03-knowledge-base/summary.md

3.2 KiB
Raw Blame History

Chapter 03 Knowledge Base System Overview

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.

Document File Description
README README.md High-level reference for the .gbkb package and its core commands (USE KB, CLEAR KB, USE WEBSITE).
KB and Tools kb-and-tools.md Integration patterns for knowledge bases and tool systems.
Vector Collections vector-collections.md Definition and management of vector collections, including creation, document addition, and usage in dialogs.
Document Indexing indexing.md Process of extracting, chunking, embedding, and storing document vectors in the VectorDB.
Semantic Search semantic-search.md How semantic search performs meaning-based retrieval using vector embeddings.
Episodic Memory episodic-memory.md Automatic conversation history management, context compaction, and intelligent summarization.
Semantic Caching caching.md Intelligent caching for LLM responses, including semantic similarity matching.

Key Configuration Parameters

Knowledge Base

Parameter Default Description
embedding-url http://localhost:8082 Embedding service endpoint
embedding-model bge-small-en-v1.5 Model for vector embeddings
rag-hybrid-enabled true Enable hybrid search
rag-top-k 10 Number of results to retrieve

Episodic Memory

Parameter Default Description
episodic-memory-enabled true Enable/disable episodic memory
episodic-memory-threshold 4 Exchanges before compaction
episodic-memory-history 2 Recent exchanges to keep
episodic-memory-model fast Model for summarization
episodic-memory-max-episodes 100 Max episodes per user
episodic-memory-retention-days 365 Days to keep episodes
episodic-memory-auto-summarize true Auto-summarize conversations

LLM Cache

Parameter Default Description
llm-cache false Enable/disable response caching
llm-cache-ttl 3600 Cache time-to-live in seconds
llm-cache-semantic true Use semantic similarity matching
llm-cache-threshold 0.95 Similarity 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