Unified Module Specification: AI Assistant
The AI Assistant is the organization's RAG-powered (Retrieval-Augmented Generation) chatbot. It enables members to ask questions in natural language and receive grounded, cited answers based on the organization's private knowledge base.
v1.0 — ApprovedPlatform: VENI-AI ShellDomain: Intelligence & RAG
1. Module Overview
AI Assistant transforms organizational documentation into an interactive knowledge base. Instead of manual searching, users interact with a chatbot that retrieves relevant content from Drive files, Document pages, and external URLs to generate accurate responses with source citations.
- Primary Goal: Instant access to organizational knowledge through natural language.
- Secondary Goal: Verify AI-generated information via linked source citations.
2. Specification Navigation
| Section | Focus | Audience |
|---|---|---|
| Technical Specification | Architecture, Stack, Security | Developers, DevOps |
| Database Schema | Tables, ERDs, Types | Developers, DBAs |
| API Reference | REST Endpoints, Contracts | Integrators, Frontend Devs |
| Functional Requirements | Features, REQ IDs | BAs, Testers |
3. Functional Requirements (SRS)
3.1 Conversational AI (CHAT)
- REQ-AI-001: System MUST provide natural language Q&A grounded in the organization's knowledge base.
- REQ-AI-002: System MUST support Streaming Responses for real-time interaction.
- REQ-AI-003: System MUST maintain persistent multi-session Conversation History per user.
3.2 Knowledge Retrieval (RAG)
- REQ-AI-004: System MUST perform Semantic Search using vector embeddings (pgvector).
- REQ-AI-005: System MUST include Source Citations with clickable links to original documents.
- REQ-AI-006: System MUST provide a side panel for Passage Preview with contextual highlights.
3.3 Knowledge Management (INDEXING)
- REQ-AI-007: System MUST support indexing of Drive Files, Document App Pages, and External URLs.
- REQ-AI-008: System MUST support manual Re-indexing (refresh) of data sources.
- REQ-AI-009: System MUST calculate and display Chunk Usage for indexed sources.
3.4 Feedback (RATING)
- REQ-AI-010: System MUST allow users to rate answers as Helpful or Unhelpful with comments.
4. Feature Specifications (Deep Dives)
Detailed specifications for each core feature:
5. Non-Functional Requirements (NFR)
5.1 Performance
- NFR-AI-PER-001: Time to first token (TTFT) MUST be < 2 seconds.
- NFR-AI-PER-002: Vector search latency MUST be < 200ms for up to 1 million chunks.
5.2 Security & Privacy
- NFR-AI-SEC-001: System MUST strictly isolate vector embeddings by
organizationId. - NFR-AI-SEC-002: System MUST NOT use organization data for public model training.
- NFR-AI-SEC-003: Knowledge base access MUST respect original document permissions (planned for v1.1).