Global Library
The shared knowledge corpus available to every tenant.
The Global Library at /operator/global-library is the operator-managed knowledge corpus that
every tenant's advisor can draw on. It is the shared playbook that complements each
organization's own documents.
What it manages
A searchable, paginated table of global documents. Each row shows the document title, category, file
size, upload date, and its current ingestion stage (queued → parsing → chunking → embedding
→ indexing → completed, or failed / dead_letter). Documents can be filtered by category.
Actions
| Action | Effect | Procedure |
|---|---|---|
| Upload | Add a new global document; it is ingested immediately. | createGlobalLibraryUploadUrl → registerGlobalDocument |
| Download | Get the original file. | globalLibraryDownloadUrl |
| Replace | Upload a new version; the old one is superseded and the new one re-ingested (latest-wins). | replaceGlobalDocument |
| Delete | Remove a document from the shared corpus. | deleteGlobalDocument |
Listing and filters use operator.listGlobalLibrary and operator.listGlobalLibraryCategories.
Because global documents are visible to every tenant, deletes and replaces have a platform-wide blast radius. The delete flow asks for confirmation; replacing supersedes the prior version rather than editing it in place.
How it reaches tenants
Global documents are stored with tenantScope = 'global' and no organizationId. During retrieval,
every plan includes the global corpus (it is the only corpus on bot_only). See
the ingestion pipeline for how a document becomes
searchable and the Nia Advisor for how scope is applied.
For the operational walkthrough, see managing the global library.
Folders and priority
Global documents are organised into folders, which can be created and which documents are filed into. The most important document in a folder can be flagged as Priority, so retrieval reaches for it first.
Flag-gated knowledge surfaces
Three further Knowledge screens appear only when their feature flag is enabled:
| Screen | Route | What it does |
|---|---|---|
| Folder Registry | /operator/folders | Manage the folder structure the library is organised into |
| Operating guide | /operator/advisor-guide | The global, house-voice guide shaping how the Advisor answers; saved changes take effect immediately |
| Retrieval preview | /operator/retrieval-preview | Run a test query through the real retrieval pipeline — read-only, no writes |
Retrieval preview is the quickest way to answer "why did the Advisor say that?" — it shows what the pipeline actually returns for a query, without spending a run or writing anything.