Skip to content

Vector Collections 🟑 BETA

A vector collection is the searchable unit that a .gbkb folder becomes, named through the bot's tenant scope and activated for a session with USE KB.

Developer guide map

From folders to collections

SessionKbAssociation carries kb_name, qdrant_collection and is_active. The collection name is derived by KbTenantScope::collection_name, so two tenants with the same folder name never share a collection. Only associations with is_active = true for the session and bot are read.

Step Code path
1. Folder discovered in the bot's .gbkb Drive monitor / indexer
2. Scope stamped from the bot and branch KbTenantScope
3. File content embedded and stored with payload metadata botqdrant indexer
4. Session activates the collection USE KB β†’ session_kb_associations
5. Query retrieval + payload/ACL recheck kb_context/ search

The indexing pipeline

Documents are stored as whole-file records. The payload keeps the content plus source metadata (document_path, source or file); retrieval reads the text from content, text or data. There is no chunk split and no overlap.

Accuracy note (September 2026). Documents are indexed as whole-file records. There is no text chunking step and no overlap between chunks, which is why long documents can lose precision β€” see Retrieval and RAG.

Embeddings and their fallbacks

Embedding settings come from EmbeddingConfig::from_bot_config: embedding-model, embedding-url, embedding-key, embedding-dimensions, embedding-batch-size, embedding-timeout and embedding-concurrent. With no usable URL the generator uses a deterministic local hash β€” see Retrieval and RAG.

Working with collections

Keyword Effect on session state
USE KB Inserts an active KB association for the named folder.
CLEAR KB Deactivates one or all KB associations.
USE WEBSITE Registers an active website association with its own collection.

Collections stay active until the session ends or the keyword clears them. Multiple collections can be active; each is searched separately and the results are merged.

Limits

  • No chunking or overlap: a long document is one vector, so precision falls with document length.
  • The hash fallback has no semantic meaning; a missing embedding URL degrades matching.
  • Retrieval is refused without a verified bot scope and every point is rechecked against its stamp and ACL.
  • Collection names are scope-derived; a script names the folder, not the physical Qdrant collection.

See Also