AI Knowledge Assistant
Secure, role-aware conversational search across fragmented company knowledge bases
The Challenge
As organizations scale, critical business knowledge fragments across Notion workspaces, Google Drive folders, Slack threads, and legacy documentation portals. Employees routinely spend 20% to 30% of their working hours searching for internal answers, reconciling conflicting document versions, or interrupting senior domain experts. Off-the-shelf generative AI chatbots present critical vulnerabilities: they lack strict role-based access controls, risking confidential financial, HR, or executive data leakage across permission boundaries. Furthermore, generic models hallucinate plausible-sounding but completely fabricated answers without auditable source citations.
System Architecture & Design
We architect a multi-source document ingestion pipeline with semantic chunking and role-based metadata tagging. Hybrid vector search queries pgvector with pre-filtering on user permissions, followed by cross-encoder reranking and token-level citation validation before delivering streamed answers to the Next.js interface.
[Data Sources: Drive / Notion / Slack / PDFs]
│
▼
[Async Ingestion & OCR Pipeline]
│
(Semantic Chunking + RBAC Tagging)
│
▼
[PostgreSQL + pgvector]
│
┌───────────────┴───────────────┐
▼ ▼
[Dense Vector Embeddings] [Sparse BM25 Index]
│ │
└───────────────┬───────────────┘
▼
[Reciprocal Rank Fusion]
│
▼
[Cross-Encoder Reranker]
│
▼
[RBAC Access-Filter Layer]
│
▼
[LLM Generation + Strict Citation Audit]
│
▼
[FastAPI Stream ➔ Next.js Client]Implementation Details
The ingestion subsystem runs on Celery background workers with Redis caching, decoupling heavy document parsing and OCR processing from user requests. PostgreSQL with pgvector serves as the unified database, keeping vector embeddings and relational access control lists within the same transactional boundary. During query execution, user input passes through query expansion, vector similarity calculation, and Reciprocal Rank Fusion. The synthesized answer contains deterministic markdown footnotes linking directly to original document page numbers and text offsets. An automated validation pass confirms all cited excerpts exist in the retrieved context before tokens stream to the user.
Our Engineering Approach
We connect approved enterprise knowledge sources, enforce strict access rules by team and role, and deploy an assistant that answers in clear language with verifiable links back to original document sections. Every response is grounded in real source text, preventing hallucinated advice while honoring data sovereignty.
Operational & Business Impact
Your organisation gains faster onboarding, fewer interruptions for senior engineers, and a dependable resource for staff to find accurate answers without exposing sensitive internal data. Team members trust the tool because every assertion is accompanied by an auditable footnote link.