Guides
Knowledge base (RAG)
Upload docs, embed, and let the AI cite your actual content.
The knowledge base feature lets your AI agent answer questions using your actual docs — release notes, help articles, policies, anything text-based.
Supported formats
- Markdown, plain text
- Word (.docx) · CSV
- JSON (extracted as text)
Upload flow
- Go to Knowledge → Upload document
- Pick a file (max 25 MB). It uploads directly to S3 via presigned POST
- The worker picks up the job: extracts text → chunks at ~800 tokens → embeds with OpenAI
text-embedding-3-small→ stores in pgvector - Status flips to
READYwhen done
How retrieval works
On every visitor message, the worker embeds the query and runs a cosine-distance search over your tenant's chunks. Top-K (default 5) chunks pass a similarity threshold and get inlined into the system prompt.
Bringing your own embeddings
In AI Agent → Embeddingsyou can set a custom embedding API endpoint — useful if you want to use Azure OpenAI, a local Ollama, or DuckLLM. The chat completion endpoint can be different from the embedding endpoint, because aggregator services often don't support embeddings.
Caching
Identical query text hits a 24-hour Redis cache, so the same FAQ doesn't re-embed on every visit. Anthropic prompt caching is applied to the system prompt + retrieved chunks for further cost savings.
When to skip RAG
Toggle RAG enabledoff if your AI agent is a pure small-talk / lead-qualification bot that doesn't need to cite docs.