Skip to main content

A knowledge base gives your apps your own content to answer from. When a question comes in, the most relevant passages are found and handed to the model along with it, so the answer draws on your content rather than only on what the model learned in training.

Use one for anything your apps should know that a model doesn’t, such as a help center, internal policies, a product catalog, or research material. Create one per domain or team, and connect it to the apps that need it.

Two Kinds of Knowledge Base #

Which one fits depends mostly on the apps you’re building and how much of the processing you want to control.

An agent knowledge base keeps setup simple: add your content, and it organizes and indexes everything on its own.

Choose it when you want:

  • Deeper searches for harder questions: pick Fast, Deep, or Research as its retrieval depth.
  • Content that stays current: connected websites, online documents, and online drives refresh on the schedule you set.
  • Built-in quality checks: re-test key questions after every change, and track what retrieval misses.
  • Access for coding agents: they read its content through the Dify CLI.

Workflow and Chatflow apps and the new Agent can use it. For a new project, start here.

Info

Most classic knowledge bases can be upgraded to agent ones later, but agent knowledge bases can’t be turned into classic ones.

Compare the Two Kinds #

Agent Knowledge BaseClassic Knowledge Base
AppsWorkflow and Chatflow apps, the new AgentChatbot, Text Generator, legacy Agent, Workflow, and Chatflow apps
Content sourcesFile uploads, website crawls, online documents, online drivesFile uploads, website crawls, Notion; other data sources through a Knowledge Pipeline; an external knowledge base
File sizeUp to 15 MB per file on every planUp to 15 MB per file on Sandbox; up to 50 MB on Professional and Team
What you configureModels and a retrieval depth, plus Top K and an optional score thresholdModels, chunk mode and length, index method, and search method, plus Top K and an optional score threshold; or the whole processing chain as a Knowledge Pipeline
SearchBy meaning and keywords; deeper retrieval depths follow related subjects or break a question into partsBy meaning, by keywords, or both
Indexing modelsThe reasoning model and the embedding modelThe embedding model (High Quality index), or no model (Economical index)
Keeping content currentEach source syncs on its own scheduleNotion and website documents sync by hand
Quality testingRetrieval tests, golden questions, evaluations, and bad casesRetrieval tests
MonitoringThe Overview page, with what needs attention and how questions were answeredNone
Access outside DifyService API and the Dify CLIService API

Both kinds share the same permission choices, document quota, request rate limit, and knowledge base API keys. Both also make images searchable with a vision-capable embedding model.