Everyone wants a chatbot on their help center. Few get it right.
The typical approach: point ChatGPT at your documentation and hope for the best. The result: a chatbot that confidently answers questions with information that's wrong, outdated, or completely fabricated. Your customers get bad answers. Your support team gets more tickets, not fewer.
The problem isn't AI. It's how you use AI. The difference between a chatbot that works and one that embarrasses you comes down to one technique: Retrieval-Augmented Generation (RAG).
Generic AI vs. RAG
Generic AI (The Wrong Way)
Feed your entire documentation into a system prompt. Let the AI answer based on what it "remembers." This fails because:
- Context window limits — you can't fit 200 articles into a prompt
- Hallucination — when the AI doesn't know, it makes something up instead of saying "I don't know"
- Staleness — the AI's knowledge is frozen at training time
- No citations — the user has no way to verify the answer
RAG (The Right Way)
When a user asks a question, RAG does two things:
- Retrieval — searches your knowledge base for the most relevant article chunks using semantic search (vector embeddings)
- Generation — sends the user's question + the retrieved chunks to the AI, which generates an answer grounded in your actual documentation
The key difference: the AI only answers based on content it was given, not content it "knows." If your docs don't cover the topic, the AI says so instead of hallucinating.
RAG turns your chatbot from a creative fiction writer into a research assistant that always cites its sources.
How FinalDoc's Reader Chatbot Works
Step 1: Embedding Your Articles
When you publish an article, FinalDoc breaks it into chunks (typically 500-1000 tokens each) and generates a vector embedding for each chunk using OpenAI's text-embedding-3-small model (1536 dimensions). These embeddings are stored in PostgreSQL with pgvector.
Think of embeddings as coordinates in meaning-space. "How do I reset my password?" and "Password recovery steps" are far apart as strings but close together as embeddings, because they mean the same thing.
Step 2: Semantic Search
When a reader asks a question, the chatbot converts the question into an embedding and searches for the nearest article chunks. This is semantic search — it finds content by meaning, not keywords.
FinalDoc uses a hybrid approach: semantic search (pgvector cosine similarity) combined with keyword search (PostgreSQL full-text search with pg_trgm fuzzy matching). The hybrid approach catches both conceptual matches and exact term matches.
Step 3: Grounded Generation
The top 5-8 relevant chunks are passed to GPT-4o-mini along with the user's question. The prompt instructs the AI to:
- Only answer based on the provided article chunks
- Cite the source article for each claim
- Say "I don't have information about that" if the chunks don't cover the topic
- Use the same tone and terminology as the source articles
Step 4: Source Citations
Every chatbot response includes clickable links to the source articles. The reader can verify the answer, read the full article, or explore related content. This builds trust — the chatbot isn't a black box.
Beyond Text: Voice Mode
Some readers prefer to speak rather than type. FinalDoc's Voice Mode extends the chatbot to real-time voice conversations:
- Press and hold to speak your question
- AI processes your speech, searches your docs, and responds with natural voice
- Choose from 6 AI voices: shimmer, alloy, echo, coral, sage, ash
- Powered by OpenAI Realtime API for low-latency conversation
Voice Mode uses the same RAG pipeline as the text chatbot. The retrieval and grounding are identical — only the input/output modality changes.
Deployment Options
Public Knowledge Base
The chatbot appears as a floating capsule button on your public KB portal. Readers click to chat. The capsule has a split design — Chat on one side, Voice on the other, with an animated cosmic orb in the center.
Help Widget
Embed the chatbot in your own website or application via the Help Widget. The widget loads your KB content and provides the same RAG-powered Q&A in your own UI.
Multi-Channel (OpenClaw AI Agent)
Deploy the chatbot on WhatsApp, Telegram, Discord, and web chat. The OpenClaw AI Agent integration handles channel-specific formatting while using the same RAG backend.
Microsoft Teams
Add FinalDoc as a Teams outgoing webhook. Team members @mention the bot and get answers from your internal knowledge base — no switching apps.
Measuring Effectiveness
A chatbot is only useful if it actually helps. Track these metrics:
- Resolution rate — what percentage of conversations end without the user contacting support?
- Citation accuracy — are the source articles actually relevant to the question?
- Fallback rate — how often does the chatbot say "I don't have information"? High rates mean content gaps.
- User satisfaction — thumbs up/down on chatbot responses
FinalDoc's Analytics dashboard tracks all of these. The Feedback inbox collects chatbot interactions where users indicated the answer wasn't helpful, so your team can improve the underlying articles.
Getting Started
The Reader Chatbot is available on Starter plans and above. To enable it:
- Go to Settings → Portal Builder
- Toggle "Enable AI Chatbot" on
- Choose your chatbot appearance (capsule, minimal, or custom)
- Publish — the chatbot appears on your public KB immediately
Your articles are automatically embedded when published. No additional setup required. The chatbot starts answering questions from day one.