Knowledge Base 🟑 BETA

The Knowledge Base (KB) system enables semantic search and document retrieval for intelligent bot responses.

Quick Overview

FeatureDescription
StorageS3-compatible drive + PostgreSQL metadata + Qdrant vectors
SearchDense vector search, optionally fused with keyword matching β€” chosen per bot by rag-mode
FormatsPDF, DOCX, DOC, XLSX, XLS, ODS, PPTX, PPT, ODP, EPUB, ODT, TXT, MD, HTML, CSV, JSON, YAML, TOML, and 30+ text-based formats
IntegrationAutomatic context injection into LLM responses

Basic Usage

' Load knowledge base
USE KB "policies"

' Bot now answers questions using that knowledge
' No explicit search needed - it's automatic

Key Capabilities

  • Semantic Search - Find content by meaning, not just keywords
  • Multi-Collection - Organize documents into focused collections
  • Auto-Indexing - Documents indexed automatically when added
  • Hybrid Search - Combines dense (semantic) retrieval with term matching, fused by Reciprocal Rank Fusion
  • Context Management - Relevant chunks injected into LLM prompts

Document Organization

bot.gbkb/
β”œβ”€β”€ policies/      β†’ USE KB "policies"
β”œβ”€β”€ products/      β†’ USE KB "products"
└── support/       β†’ USE KB "support"

Configuration

Retrieval strategy is one per-bot setting:

name,value
rag-mode,hybrid

rag-mode accepts standard, hybrid, corrective, graph, agentic or multimodal, and defaults to standard. It is read from the bot’s configuration row (environment fallback RAG_MODE), not from config.csv. The older rag-hybrid-enabled / rag-dense-weight / rag-sparse-weight keys are read only by an unconnected crate and have no effect β€” see Retrieval and RAG.

Performance Tips

  1. Organize collections by topic for precise activation
  2. Clear unused KBs to free memory: CLEAR KB "old-docs"
  3. Enable caching for repeated queries
  4. Tune weights based on content type (technical vs conversational)

Learn More