Building knowledge-base Q&A on Dify: an internal ChatGPT for your team
Upload docs, tune retrieval, pick a model, publish: the standard four steps of a RAG app.
Four steps
① Create a knowledge base, upload PDFs/pages/sheets, choose chunking; ② create a chat app and attach it; ③ swap models freely — DeepSeek for cost, flagships for stability; ④ publish as a page, embed or API. Validate on the free cloud, self-host the OSS version later.
If answers disappoint, tune these
Poor recall → smaller chunks + reranking; off-topic answers → force "answer only from the knowledge base"; messy citations → enable source return. 80% of RAG quality is retrieval config, not the model.
中文
Dify 搭建知识库问答教程:给团队做一个"内部 ChatGPT"
上传文档、配置检索、挑模型、发布应用:RAG 应用的标准四步。
四步搭建
① 建知识库,上传 PDF/网页/表格,选好切分方式;② 建应用(聊天型),挂上知识库;③ 模型随意换——DeepSeek 便宜、旗舰模型更稳,一键切换对比;④ 发布成网页/嵌入代码/API。云版免费额度足够验证想法,满意后再自部署开源版。
效果不好先调这三处
命中率低→调小切块、开启重排序;答非所问→在提示词里强制"仅依据知识库,无据请说不知道";引用混乱→开启引用返回并让前端展示出处。RAG 的效果 80% 取决于检索配置而非模型。