Building a website chatbot that knows your product is now achievable without a machine learning team. This guide covers the options from no-code to custom-built.
Three Implementation Approaches
Option A: No-Code Tool (hours to set up) Best for: Small to medium sites with existing documentation Tools: Intercom Fin, Tidio AI, Chatbase
Option B: RAG on existing docs (days to set up) Best for: Technical teams wanting control over AI quality Stack: LlamaIndex or LangChain + vector DB + LLM API
Option C: Custom agent (weeks to build) Best for: Complex workflows, tool calling, multi-step support Stack: Anthropic API + custom backend + orchestration
Option A: No-Code Chatbot (Recommended Start)
Using Chatbase
Chatbase is the fastest path to a quality chatbot trained on your content.
Step 1: Connect your knowledge sources
- Upload PDFs (documentation, FAQs, product guides)
- Add website URLs to crawl
- Connect Notion, Google Docs, or Confluence
Step 2: Configure the chatbot
System prompt:
"You are [Company Name]'s support assistant.
Help users with questions about [product].
If you don't know the answer, direct users to [contact page].
Never make up features or capabilities.
Always be [tone description]."
Step 3: Tune the behavior
- Set response length limits
- Configure fallback messages for unknown questions
- Set lead capture for when AI can’t resolve
Step 4: Embed on your site
<!-- Chatbase embed snippet -->
<script>
window.embeddedChatbotConfig = {
chatbotId: "YOUR_CHATBOT_ID",
domain: "www.chatbase.co"
}
</script>
<script src="https://www.chatbase.co/embed.min.js" defer></script>
Option B: RAG Chatbot with LlamaIndex
For teams wanting more control over the AI quality and behavior.
Architecture
User message
↓
Query embedding
↓
Vector similarity search (your docs)
↓
Retrieved context chunks
↓
LLM prompt: [context] + [user message]
↓
AI response
Implementation
Step 1: Install dependencies
pip install llama-index openai chromadb
Step 2: Index your documentation
from llama_index.core import VectorStoreIndex, SimpleDirectoryReader
from llama_index.core import Settings
from llama_index.llms.anthropic import Anthropic
from llama_index.embeddings.openai import OpenAIEmbedding
# Configure LLM and embeddings
Settings.llm = Anthropic(model="claude-haiku-4-5-20251001")
Settings.embed_model = OpenAIEmbedding(model="text-embedding-3-small")
# Load your docs
documents = SimpleDirectoryReader("./docs").load_data()
# Build index
index = VectorStoreIndex.from_documents(documents)
# Create query engine
query_engine = index.as_query_engine(
similarity_top_k=5,
response_mode="compact"
)
Step 3: Create a simple API
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class ChatRequest(BaseModel):
message: str
session_id: str
@app.post("/chat")
async def chat(request: ChatRequest):
response = query_engine.query(request.message)
return {
"response": str(response),
"sources": [node.node.metadata for node in response.source_nodes]
}
Step 4: Handle multi-turn conversations
For conversation memory, use LlamaIndex’s chat engine:
chat_engine = index.as_chat_engine(
chat_mode="condense_plus_context",
verbose=True,
system_prompt="You are a helpful support assistant for [Company]. Use only the provided context to answer questions."
)
# In your API handler:
response = chat_engine.chat(user_message)
Option C: Custom Agent with Tool Calling
For chatbots that need to take actions (look up orders, check status, create tickets):
import anthropic
client = anthropic.Anthropic()
tools = [
{
"name": "get_order_status",
"description": "Get the current status of a customer order",
"input_schema": {
"type": "object",
"properties": {
"order_id": {"type": "string", "description": "The order ID"}
},
"required": ["order_id"]
}
},
{
"name": "create_support_ticket",
"description": "Create a support ticket for a customer issue",
"input_schema": {
"type": "object",
"properties": {
"issue": {"type": "string"},
"customer_email": {"type": "string"},
"priority": {"type": "string", "enum": ["low", "medium", "high"]}
},
"required": ["issue", "customer_email"]
}
}
]
def chat_with_tools(messages):
response = client.messages.create(
model="claude-haiku-4-5-20251001",
max_tokens=1024,
tools=tools,
messages=messages
)
return response
Knowledge Base Best Practices
Content that makes chatbots better:
- FAQs with clear question/answer format
- Product documentation with section headers
- Troubleshooting guides with specific steps
- Pricing information (keep updated)
- Policy documents (returns, shipping, etc.)
Content to exclude:
- Internal-only information
- Outdated documentation (clean this up first)
- Sales collateral with promises the support team can’t fulfill
Testing Before Launch
Test checklist:
□ Ask 20 real user questions from support tickets
□ Test edge cases: out-of-scope questions, rude users, competitors
□ Verify citations/sources are accurate
□ Test fallback behavior (what happens when AI doesn't know)
□ Test on mobile
□ Get 3 team members to try breaking it
Measuring Success
Key metrics to track:
- Resolution rate (% of chats resolved without human)
- Escalation rate (% handed to human agents)
- User satisfaction score (post-chat survey)
- Deflection rate (tickets saved)
- Questions the bot couldn’t answer (use for content gaps)
A well-configured chatbot typically achieves 40-60% resolution rate in the first month.