Build an internal AI assistant that answers company process questions (Slack/Telegram + RAG)
TL;DR
Architecture: internal docs → chunk + embed → vector store; Slack/Telegram question → retrieve relevant chunks → Claude answers with source links, says “I don't know” when nothing matches. Doable with n8n or a few hundred lines of code. Permissions and doc freshness matter most.
Architecture
Sources: Confluence / Google Drive / Notion
→ chunk + embed → vector store (pgvector, Qdrant…)
Slack/Telegram question
→ retrieve top-k chunks (filtered by the asker's permissions)
→ Claude: answer ONLY from retrieved chunks + cite links
→ log unanswered questions → docs backlogDesign decisions
| Issue | Recommendation |
|---|---|
| Permissions | Tag chunks with access metadata, filter before prompting |
| Hallucinations | System prompt: not in sources → “no documentation yet” |
| Stale docs | Sync regularly, show each source's last-updated date |
| Sensitive data | Keep salaries and HR records out of the shared index |
| Measuring value | 👍/👎 buttons, rate of unanswerable questions |
3-step rollout
- MVP: one department, 20–50 docs, one Slack channel.
- Measure for 2 weeks: repeated questions, wrong answers.
- Add sources and permissions, plug it into new-hire onboarding.
References: Contextual Retrieval — Anthropic · n8n AI Agent node