Skip to Content
Apps & PortalsManageScreen Flows — Knowledge Base

Screen Flows — Knowledge Base

Screen IDs reference screens-knowledge-base.md.

Audience: Tenant admins (Dashboard) and DM Portal reviewers. Platform: Web only. Entry point: Dashboard Settings sidebar → Knowledge Base → /settings/knowledge-base

Status: [To Build] — The entire Knowledge Base / RAG system is new. No KB screens exist in the current live app. All flows below are specifications for what needs to be built.


1. Overview → Dataset Management

Rendering diagram…

2. Dataset Detail — KB2

KB2 is a three-tab screen for a specific dataset.

Rendering diagram…

3. Upload File Modal — KB3

Rendering diagram…

4. Retrieval Sandbox — KB4

Rendering diagram…

5. Dataset Configuration — KB5

Rendering diagram…

Note: Embedding model is read-only after dataset creation. Changing the model would invalidate all existing vectors — users must create a new dataset instead.


6. Website Crawl Settings Modal — KB6

Rendering diagram…

Schedule options: Weekly (every Monday at 3am) · Monthly · Manual only.


7. RAG Context in Other Apps

Knowledge Base content surfaces in two other apps when agents use rag_search.

Dashboard — Campaign Detail Activity tab

Activity cards show a collapsible “Retrieved context” section listing:

  • Each RAG query the agent made
  • Dataset searched, chunk count, relevance scores
  • Chunk preview text and source file

DM Portal — Activity Detail (P3)

Same “Retrieved context” section appears in the right metadata pane alongside cost, token count, and model info. This lets reviewers identify poor retrieval quality and flag that a re-crawl or re-index is needed.

Manage — Tenant Detail Knowledge Base tab (M3)

Super admins see a read-only dataset summary per tenant:

DatasetFilesChunksEmbedding ModelStatus
Client Documents329text-embed-3-small
Website Content142 pages1,840text-embed-3-small✅ weekly crawl
Published Content24312text-embed-3-small✅ auto
Competitor Research18210nomic-embed-text✅ local

Admins can trigger re-index or clear a dataset on behalf of a tenant; all actions are written to audit_logs.


8. Screen Index

ScreenRouteTrigger
KB1 — Overview/settings/knowledge-baseSettings sidebar
KB2 — Files tab/settings/knowledge-base/[datasetId]”View All Files” / “View Pages” etc.
KB3 — Upload modal(modal on KB2)”+ Upload Files” button
KB4 — Sandbox tab/settings/knowledge-base/[datasetId]/sandbox”Sandbox” tab or “Test Retrieval” link
KB5 — Configure tab/settings/knowledge-base/[datasetId]/configure”Configure” tab
KB6 — Crawl settings(modal on KB1)“Re-crawl Now” or gear icon on Website Content card

© 2026 Leadmetrics — Internal use only