Skip to content

Knowledge base (TenancyEngine)

Upload reference documents (policies, FAQs, product docs) that power your application's AI chat — the assistant answers tenant questions using your own content instead of generic knowledge, and issue widget keys that let your app embed that chat safely on tenant-facing pages.

Console: Application workspace → Knowledge base (/applications/:id/knowledge)

Requires Applications configure to upload/delete documents or issue/revoke chat widget keys. Read-only access shows existing documents and keys.

Not shown on the platform-system workspace. Requires an AI provider to be configured for your organization — without one, uploads succeed but ingestion (chunking + embedding) will fail.

Knowledge base documents

  1. Click Upload document, give it a title, and choose a file (Markdown or plain text).
  2. The document is chunked and embedded automatically. Status moves from PendingReady (or Failed if ingestion errors — check that your AI provider keys are configured).
  3. Once Ready, the document's content becomes searchable by your application's AI chat — the assistant retrieves the most relevant chunks for a tenant's question and grounds its answer in them.
  4. Delete a document to remove it (and its embedded chunks) from the knowledge base immediately. This does not affect chat history, only future answers.

The Chunks column shows how many pieces the document was split into for retrieval — larger documents produce more chunks.

RAG launch readiness

Use the readiness panel before turning the widget on for customers:

  1. Upload app-specific source docs. Do not mix documentation for another application or tenant into this workspace.
  2. Confirm at least one document is Ready with non-zero chunks. Failed documents usually mean provider routing, provider credentials, or source-format setup needs review.
  3. Issue an active chat widget key and wire it into the tenant-facing widget. The public chat endpoint resolves the application from the key, then checks that the requested tenant belongs to that application.
  4. Run source and eval checks. Keep a small set of tenant-specific questions with expected answers and source notes, then rerun it after large doc uploads or provider/model changes.

Good eval questions should include:

  • A question whose answer exists in one uploaded source.
  • A question that should not be answerable from the uploaded sources.
  • A tenant-specific question that would be wrong if another tenant's or application's documents leaked into retrieval.
  • A policy or pricing question where the wording must match current source material.

Chat widget keys

A chat widget key is what your application's frontend uses to open an authenticated chat session on behalf of a tenant, without exposing your platform API key.

  1. Click Issue key. The plain key is shown once — copy it immediately, it cannot be retrieved again afterward (only its prefix and status remain visible).
  2. Wire the key into your app's chat widget initialization.
  3. Revoke a key immediately if it's compromised or no longer needed — revocation takes effect on the next chat request.

Scope

Documents and chat keys are scoped to a single application — they are not shared across your organization's other applications, and are not visible to tenants directly (only through the chat responses they ground).

AI provider and BYOK routing are configured separately under AI provider. This page shows the application-scoped RAG inputs and widget keys; it does not store provider secrets.

TenancyEngine platform documentation