// Knowledge Base screen — hybrid search, sources, index health, collections const KB_SOURCES = [ { id: 'docs', name: 'Product Docs', icon: 'book', path: '/docs', count: '1,284 pages', fresh: 'synced 4m ago', status: 'live' }, { id: 'runbooks', name: 'Runbooks', icon: 'log', path: 'ops/runbooks', count: '96 docs', fresh: 'synced 12m ago', status: 'live' }, { id: 'tickets', name: 'Support Tickets', icon: 'layers', path: 'Tickets module', count: '8,402 threads', fresh: 'syncing · 81%', status: 'sync' }, { id: 'code', name: 'Codebase', icon: 'branch', path: '6 repositories', count: '41,209 files', fresh: 'synced 1h ago', status: 'live' }, { id: 'api', name: 'API Specs', icon: 'box', path: 'OpenAPI · 14 svc', count: '912 endpoints', fresh: 'synced 22m ago', status: 'live' }, { id: 'changelog',name: 'Changelogs', icon: 'clock', path: 'releases/*', count: '312 entries', fresh: 'stale · 2d ago', status: 'warn' }, ]; const KB_RESULTS = [ { score: 0.94, source: 'runbooks', sourceLabel: 'Runbook', path: 'ops/runbooks/db-partition-cutover.md', title: 'Partition cutover procedure', snippet: 'Switch read traffic to users_new in shadow mode, verify parity ≥ 99.99% across 50k probe queries, then promote writes. Roll back instantly if parity drops below threshold.' }, { score: 0.89, source: 'code', sourceLabel: 'Code', path: 'migrator/src/cutover.ts · L142', title: 'cutover.promoteWrites()', snippet: 'Acquires advisory lock, flips routing flag, drains in-flight writes to legacy table, then re-points the connection pool. Emits cutover.completed on the audit bus.' }, { score: 0.81, source: 'docs', sourceLabel: 'Docs', path: '/docs/migrations/zero-downtime', title: 'Zero-downtime migrations', snippet: 'A safe cutover happens in three phases — shadow, read-switch, write-switch. Each phase is independently reversible and gated behind an approval when the table affects billing.' }, { score: 0.74, source: 'tickets', sourceLabel: 'Ticket', path: 'TKT-2218 · resolved', title: 'Cutover stalled on idx rebuild', snippet: 'Index idx_users_email rebuild took 3× baseline. Mitigation: build concurrently before the read-switch phase, not during.' }, ]; const KB_COLLECTIONS = [ { name: 'Incident response', docs: 42, color: 'var(--c-status-failed)' }, { name: 'Onboarding', docs: 31, color: 'var(--c-status-running)' }, { name: 'Billing & payments',docs: 58, color: 'var(--c-status-review)' }, { name: 'Security policies', docs: 27, color: 'var(--c-status-done)' }, ]; const KB_RECENT = [ 'rollback steps for failed module install', 'who owns the autoscaler config', 'rate limits on the billing webhooks', 'how to rotate KMS keys safely', ]; function KbScore({ score }) { return ( {score.toFixed(2)} ); } function KnowledgeBase() { const [query, setQuery] = React.useState('how does partition cutover work'); return (

Knowledge Base

Hybrid vector + lexical index over docs, runbooks, tickets & code · queried by agents at dispatch time

Indexed docs
52,415
▲ 1,204 this week
Vectors
1.94M
3,072-dim · ClickHouse
Sources
6connected
1 stale · 1 syncing
Index freshness
98.2%
rebuilt 4m ago
{/* Search */}
setQuery(e.target.value)} placeholder="Search the knowledge base…" spellCheck={false} /> hybrid
4 results · 38ms vector 0.6 lexical 0.4
{KB_RESULTS.map((r, i) => (
{r.sourceLabel} {r.title}

{r.path}
))}
{/* Sources */}
Indexed sources
{KB_SOURCES.map(s => (
{s.name}
{s.path} · {s.count}
{s.status === 'live' && live} {s.status === 'sync' && syncing} {s.status === 'warn' && stale}
{s.fresh}
))}
{/* Index health */}
Index health healthy
Embedding modeltext-embedding-3-large
Dimensions3,072
Vector storeClickHouse · hnsw
Rerankercohere-rerank-v3
Tickets re-index81%
{/* Collections */}
Collections
{KB_COLLECTIONS.map((c, i) => (
{c.name}
{c.docs} docs
))}
{/* Recent queries */}
Recent agent queries
{KB_RECENT.map((q, i) => ( ))}
); } window.KnowledgeBase = KnowledgeBase;