KnowledgeOS
Ask the company. See the evidence behind the answer.
- Built for
- Portfolio implementation — enterprise knowledge assistant
- Engagement
- Retrieval-augmented generation / AI implementation
- My role
- Requirements, architecture, retrieval design, grounding, API implementation, evaluation design and deployment
- Source
- emmanuel-nanadoum.vercel.app/knowledgeos
Status at time of writing
Stamped from the live build, not from the plan.
| Component | Status | Note |
|---|---|---|
| Interactive RAG demo | Live Question, retrieval, grounded answer and source evidence are implemented. | Question, retrieval, grounded answer and source evidence are implemented. |
| Embedding retrieval | Live Gemini embeddings when configured, with deterministic lexical fallback. | Gemini embeddings when configured, with deterministic lexical fallback. |
| Enterprise multi-tenant controls | Not activated Production architecture is documented; organization auth, RLS and ingestion are the next product phase. | Production architecture is documented; organization auth, RLS and ingestion are the next product phase. |
1Business problem
Company knowledge is fragmented across policies, playbooks, implementation guides and operational systems, forcing employees to search manually or rely on memory.
A generic chatbot can answer confidently without evidence. For business policy and operations, an unsupported answer can be worse than no answer.
2Discovery
- 2.1The useful unit is not merely an answer; it is an answer plus the evidence that supports it.
- 2.2Unsupported policy generation is a failure mode, so refusal behavior is a product requirement rather than an edge case.
- 2.3A synthetic demonstration corpus proves the architecture without exposing private company data.
3Requirements
| R-01 | Retrieve relevant evidence before generation. |
|---|---|
| R-02 | Use semantic embeddings when available with a resilient deterministic retrieval fallback. |
| R-03 | Constrain generation to retrieved evidence and refuse unsupported questions. |
| R-04 | Keep model credentials and AI execution server-side. |
| R-05 | Expose sources, architecture, limitations and production extension points. |
| R-06 | Design the production path for precomputed vectors, Postgres/pgvector and permission-aware retrieval. |
4Solution architecture
KnowledgeOS separates retrieval from generation so the model receives a bounded evidence set before it is allowed to answer.
Live RAG path
- 01User question
- 02Query embedding
- 03Retrieve + rank
- 04Grounded generation
- 05Answer + citations
Production ingestion path
- 01Upload
- 02Parse + normalize
- 03Chunk + metadata
- 04Embeddings
- 05Postgres / pgvector
- 06Permission filter
- 07Evaluation + monitoring
5Demo / POC
The public demo includes answerable questions and an intentionally unsupported parental-leave question to make refusal behavior visible.
6Technologies
- Next.js
- TypeScript
- Gemini API
- Gemini embeddings
- RAG
- REST API
- Vercel Functions
- Source citations
- Lexical fallback
- Postgres / pgvector production design
7Integration points
| From | To | Detail |
|---|---|---|
| Browser | /api/knowledgeosQuestion in; grounded answer, retrieval mode and sources out. | Question in; grounded answer, retrieval mode and sources out. |
| RAG API | Embedding modelSemantic query and knowledge representations when configured. | Semantic query and knowledge representations when configured. |
| Retrieved evidence | Generative modelOnly ranked source context is supplied for answering. | Only ranked source context is supplied for answering. |
| Production design | Postgres / pgvector + RLSPrecomputed vectors and permission-aware retrieval. | Precomputed vectors and permission-aware retrieval. |
8Tradeoffs
| Decision | Instead of | Why |
|---|---|---|
| Synthetic public corpus | Instead of: Private company documents | Demonstrates the system safely without exposing customer or employer information. |
| Evidence-first refusal | Instead of: Always produce an answer | Trust requires the system to expose when the knowledge base cannot support a claim. |
| Embeddings plus lexical fallback | Instead of: Single-provider dependency | The demo remains testable if embedding service availability changes. |
| Compact live corpus | Instead of: Premature ingestion platform | Proves the core RAG loop first; production ingestion is the next product phase. |
9Implementation & handoff
- Production rollout adds authenticated organization workspaces, document upload, asynchronous parsing/chunking and precomputed embeddings.
- Postgres/pgvector plus row-level security provides organization and user-aware retrieval boundaries.
- Evaluation sets, latency/cost monitoring, source administration and controlled re-indexing become operational controls.
10What this demonstrates
- 1.Implements the complete retrieval → ranking → grounded generation → citation/refusal loop.
- 2.Treats hallucination control, evidence visibility and failure behavior as implementation requirements.
- 3.Documents production architecture and tradeoffs without presenting unbuilt enterprise controls as shipped.