Skip to content

Knowledge bases & RAG

A knowledge base collection is a set of documents that Brutor extracts, chunks, embeds and stores in a per-tenant vector store (Qdrant collection brutor_kb_{tenant_id}). Bind a collection to a resource group and every chat completion made under that group is grounded automatically: the Core Proxy retrieves the most relevant chunks and injects them as a system message before the request reaches the provider.

Write path: content from Confluence, Notion, Drive, Slack, GitHub, Jira, SharePoint and a web crawler, or files uploaded directly, reaches the platform via KB Connector Sync or direct upload; the KB Uploader extracts, chunks, embeds as a dense vector plus BM25 tokens, and writes one point per chunk into Qdrant with its source and permissions. Read path: a question arrives, the Gateway Core embeds it with the same model, runs a hybrid dense-plus-BM25 search fused with RRF, filters to chunks the asker could have opened at source, and injects the top passages so the model answers with citations.

Concern Component Surface
Collections, documents, uploads, admin search preview Control Plane (:5050) /v1/admin/knowledge-base/... (hyphenated)
Source connectors and identity mappings Control Plane (:5050) /v1/admin/kb-connectors/..., /v1/admin/kb-connector-identities/...
Tenant embedding model and full re-embed Control Plane (:5050) PATCH /v1/admin/tenants/{tenant_id}, POST /v1/admin/tenants/{tenant_id}/re-embed-kb
Extraction, chunking, embedding, vector writes KB Uploader (internal :8200) Polls kb_documents with status = 'pending'
Scheduled pulls from external sources KB Connector Sync (internal :8201) Claims due rows in kb_connectors
Retrieval and context injection Core Proxy (:8100) POST /v1/proxy/llm/chat/completions
End-user browse view Core Proxy (:8100) /v1/portal/knowledgebases (plural, one word), /v1/portal/kb-identities

Admin endpoints take an admin JWT (POST /v1/admin-users/tenant/login); portal endpoints take a portal JWT (POST /v1/portal/auth/login); chat takes an API key or a portal JWT. The admin UI for all of this is AI Estate → Resources → Knowledge Base (Collections and Connectors).

  1. Pick the tenant’s embedding model (once per tenant). Every collection in the tenant shares one vector space. See Embeddings & re-embedding.

  2. Create a collection and bind it to a resource group.

    Terminal window
    curl -s -X POST http://localhost:5050/v1/admin/knowledge-base/collections \
    -H "Authorization: Bearer $ADMIN_JWT" -H "Content-Type: application/json" \
    -d '{"name": "sales-playbooks", "group_ids": ["group-01M61N36QYK1HVPN41KAE35PHP"]}'

    Details: Collections & access.

  3. Add content: upload files (Upload & ingestion) or configure a connector (Source connectors).

  4. Wait for status: "ready" on each document. Ingestion is asynchronous; a 201 on upload means queued.

  5. Chat. Any POST /v1/proxy/llm/chat/completions made under the bound group is grounded, with no change to the request. See Retrieval & grounding.

No per-request KB selection

Retrieval scope is a governance decision made by binding collections to groups. A caller cannot widen it by naming a collection in the request.

One vector space per tenant

The embedding model is set on the tenant (default_embedding_model_id), not per collection. Switching it means re-embedding everything.

Embeddings are governed traffic

Ingest and query embeddings go through the Core Proxy’s /v1/proxy/llm/embeddings, so they are logged, metered and policy-checked like any other model call.

Tenant isolation at the vector store

Every Qdrant call carries a fresh 300-second JWT scoped to exactly one tenant’s collection, so Qdrant itself refuses cross-tenant reads.