Home / Documentation / Configuration Guide

Knowledge Base Isolation, Sharing and RAG

Intelligent knowledge management

The knowledge base module provides an isolation-and-sharing model across multiple users and multiple knowledge bases, layered with hybrid retrieval and intelligent RAG enhancement.

The four-tier visibility model

VisibilityDescriptionTypical use
publicOpen — visible to everyoneShared public knowledge bases
privateCreator only (the default)Personal knowledge bases
shared_withVisible to specified users or groupsTeam collaboration
Approval-gatedAccess requests require approvalSensitive knowledge bases

The RAG retrieval pipeline

user question → hybrid retrieval (vectors + FTS5 full text + RRF fusion)
    ↓
knowledge base hits → permission filtering (strict 401)
    ↓
memory sync → context fusion → answer generated

Hybrid retrieval strategy

  • Vector retrieval (primary): semantic similarity (vector_index)
  • FTS5 full-text retrieval (secondary): exact keyword matching
  • RRF hybrid ranking: Reciprocal Rank Fusion
  • Adaptive retrieval: adjusts dynamically to query complexity (off by default)

API

GET  /api/v1/knowledge        # list knowledge bases
POST /api/v1/knowledge        # create a knowledge base
POST /api/v1/knowledge/{id}/search  # search (hybrid RAG)
POST /api/v1/knowledge/{id}/share   # share / approval
GET  /api/v1/knowledge-graph  # knowledge graph