Skip to main content
Beginner45-75 minDifyknowledge basemodel provider

Build a RAG chatbot with Dify

Use Dify as a visual platform for a knowledge-base-backed assistant.

Prerequisites

  • Dify workspace
  • Sample documents
  • Model provider configured

Step-by-step tutorial

Step 1

Create the workspace and app

Start with a chat application so users can ask questions conversationally.

  • Create workspace
  • Create chat app
  • Name the assistant
  • Define scope

Step 2

Create a knowledge base

Upload a small, trusted document set first. Do not start with a messy archive.

  • Upload documents
  • Review parsed text
  • Add metadata if available
  • Exclude obsolete files

Step 3

Configure retrieval

Adjust retrieval settings and test whether the correct passages appear before improving prompts.

  • Test known questions
  • Inspect retrieved chunks
  • Tune top-k
  • Enable citations if available

Step 4

Publish and review

Share with a small group and collect failed questions before broader release.

  • Review logs
  • Add no-answer guidance
  • Document update workflow
  • Plan evaluation

Next steps

  • Add evaluation questions
  • Compare with Flowise
  • Document model and retrieval settings