上传支持文档到向量知识库,创建能检索答案的客服机器人,复杂问题转人工。
适用场景
SaaS companies with 1000+ support tickets per month looking to deflect 40-60% of repetitive questions.
前提条件
Dify account (cloud or self-hosted), knowledge base documents, OpenAI/Anthropic API key
工作流图
用 Dify 搭建知识库客服机器人
分步指南
-
Upload Knowledge Base
In Dify, create a new Knowledge Base. Upload PDF, Markdown, or text files of your FAQ, product docs, and support tickets. Configure chunking strategy: 500 tokens per chunk, 10% overlap.
-
Create Chatbot App
Create a new Chat App in Dify. Select your knowledge base as the context. Set the system prompt: 'You are a support agent for [COMPANY]. Answer questions using only the provided knowledge base. If you cannot find an answer, say you will connect them to a human agent.'
-
Configure Model Parameters
Set temperature to 0.3 for factual responses. Set max tokens to 500. Enable citation display so the bot can show which doc section the answer came from.
-
Add Escalation Logic
Use Dify's workflow mode to add a conditional node: if the bot confidence score is below threshold (or user asks for human), trigger a webhook to your ticketing system (Zendesk/Intercom) with the full conversation.
-
Deploy and Test
Embed the chatbot widget on your website or connect via API. Run 20 test conversations covering common, edge, and unknown questions. Adjust the knowledge base based on gaps found.