When a Dify knowledge pipeline beats the ready-to-use knowledge base
A Dify knowledge pipeline beats the ready-to-use knowledge base when your documents arrive from several sources, need extraction or processing before retrieval, and must be stored under rules you can explain to an auditor. The ready-to-use path works when files can be uploaded as they are and split with default settings. A regulated team with scanned forms in one system, contracts in a document store and policy PDFs on a shared drive usually needs more control over each step than that path offers. Dify documents a knowledge pipeline as four stages: data sources, data extraction, data processing and knowledge storage. Each stage is a place where you decide what leaves the source, what text is produced, how it is cleaned and split, and where the resulting index lives.
Dify offers three starting points for a pipeline: a built-in template, a blank pipeline, or an imported pipeline. A template is the fastest route when your sources and processing steps match what it already assumes. A blank pipeline lets you define every stage yourself, which suits custom extraction. An imported pipeline lets you move a design between environments, but you should confirm in your own instance how the import handles data source authorizations and model references, because those are set separately from the pipeline itself. Before choosing, list each source, its owner, the sensitivity of its content and the extraction tool you need for its file types. That list tells you whether a template covers the work or whether a blank pipeline is the honest choice.
Keep the decision reversible in the design phase. Test one representative file from each source through a draft pipeline and inspect the extracted text and the stored chunks before you publish. If the output is wrong at the extraction stage, no later setting will fix it, so record which source and file type caused each failure. Ask your Dify partner or internal team to confirm, against your own instance and the Dify documentation on building a custom knowledge base, which steps need separate data source authorization and which settings are per pipeline. Those answers determine how much of the build is one-time setup and how much is ongoing maintenance when a source changes.
Choosing between built-in templates, a blank pipeline and an imported pipeline
Built-in templates suit a team whose documents are fairly standard and whose ingestion needs are close to what Dify already provides. The template supplies the four stages of a knowledge pipeline, data sources, data extraction, data processing and knowledge storage, already connected. The builder's job is to confirm that each stage fits the document set, adjust settings, and test the output before the knowledge base is used.
- Fit check: Confirm that the file types, layouts and languages in your corpus match what the template's extraction step was designed for.
- Limited graph knowledge: The builder needs to understand each stage's settings, not how to design a new processing graph from scratch.
- Faster first run: Teams can reach a testable knowledge base sooner because the structure already exists.
- Publishing: A template-based pipeline is published like any other, so later edits to stage settings require republishing before they affect uploads.
- Moving: Confirm that any external data source authorization or storage settings are re-entered in the target instance, since those are tied to the environment.
Before relying on a template, check which extraction options it uses against a sample of your real documents, including scanned or poorly formatted files.
A blank pipeline suits a team that must design its own extraction and processing, for example when documents need custom parsing, field-level cleanup, or routing between different storage targets. The builder starts with an empty canvas and assembles each stage. This takes knowledge of how each extraction and processing node transforms content, and how the output of one stage becomes the input of the next.
- Design ownership: The team decides the sequence of extraction, cleanup and chunk preparation, and must document why each step exists.
- Testing burden: Each node needs its own test inputs, since a problem in extraction often appears only later as poor retrieval.
- Orchestration skills: Builders need comfort with variables, conditions and error paths in the visual editor.
- Publishing: Every change to the canvas becomes a new published state, so version notes should record what changed and why.
- Moving: Custom logic is portable only if the exported pipeline and any referenced credentials, plugins or external services are rebuilt in the target.
Ask whether the team has an owner for the pipeline who can maintain it after the initial build, because blank pipelines are only as maintainable as their documentation and test set.
An imported pipeline suits a team that already has a working pipeline in another Dify instance, such as a tested staging environment, and wants the same processing in production. The builder imports the definition and then rebinds it to local resources. The skill required is less about designing the graph and more about verifying that each reference resolves correctly in the new environment.
- Rebinding references: Model providers, plugins, storage targets and data source authorizations usually need to be configured again in the receiving instance.
- Version parity: Confirm that the Dify version of the target matches the version that produced the export, or test the import first, since node behavior can differ between releases.
- Credentials stay behind: Treat secrets and external connections as separate items to rebuild, not as content that travels with the file.
- Publishing: The imported definition should be published in the target only after the references are checked, so uploads do not run against missing resources.
- Moving again: Keep the source and target definitions under version control so the two environments can be compared when issues appear.
For a concrete check, confirm with your Dify administrator how the export is produced and which settings the export excludes in your version, using the Dify app management documentation as the starting reference.
Pipeline design options and when each fits
This table compares the decisions that shape a custom knowledge pipeline: source, extraction, processing and storage. Read each row as a question to settle before you build, since each choice constrains the ones after it. The main takeaway is that the storage targets are a platform choice, so confirm them against your Dify version before you commit.
| Decision | When it fits | What it constrains |
|---|---|---|
| Data source type | Files you upload directly or content that changes on a schedule and needs re-ingestion | Authorization is handled separately from the pipeline, so confirm the source connection works in your environment before design |
| Extraction method | Standard documents that the built-in extractor handles well, or formats that need a custom step | Extraction output sets the quality ceiling, so test with real samples from each file type you expect |
| Processing steps (chunking and cleaning) | Documents with structure that a default split would break, such as tables, headings or repeated boilerplate | Chunk boundaries decide retrieval quality and index size, so changes here usually mean reprocessing content |
| Storage target: metadata database | PostgreSQL is the default; MySQL or OceanBase fit teams that already run those engines | Choose at deployment time, since it is the system of record for pipeline and knowledge base metadata |
| Storage target: file storage | Local or OpenDAL-based storage for small installs; S3-compatible, Azure Blob or Google Cloud Storage for managed object storage | Affects backup scope, retention and where source documents physically reside |
| Storage target: vector store | Weaviate is the default; Qdrant, Milvus, pgvector, OpenSearch and Elasticsearch are documented alternatives | Determines index capacity, filtering behavior and operational skills needed, so confirm version support before selecting |
| Built-in template versus blank pipeline | Template for standard document flows; blank pipeline when you need custom extraction or processing order | A blank pipeline means you own its maintenance and testing across Dify upgrades |
How to build and publish a custom knowledge pipeline
This sequence takes a team from an empty pipeline to a published knowledge base that has been tested against real documents. Each step closes with a check, so problems surface in a test workspace before any end user relies on the retrieval results.
Confirm the data source and access plan
Before opening the pipeline editor, decide which source holds the documents (file uploads, a connected data source or an external system), who owns it and which account the pipeline will use to read it. Authorize the data source separately in Dify so the credentials and scope are recorded outside the pipeline itself. The step is done when a named owner has approved the source, the read scope is limited to the documents needed, and an authorization test returns the expected document list.
Create the pipeline from a template or blank
In the knowledge area, create a knowledge pipeline either from a built-in template or as a blank pipeline, or import an existing pipeline definition. Templates suit common document types, while a blank pipeline suits unusual extraction or processing needs. The output of this step is a draft pipeline with a name, and the check is that the four stages (data source, data extraction, data processing and knowledge storage) are all visible on the canvas.
Orchestrate the four stages
Connect the data source to the extraction node, then configure extraction for the file types you will ingest, processing for chunking and any cleaning or transformation, and storage for the index and vector settings. Keep each node's settings written down so a reviewer can trace how a document became chunks. The step closes when a sample file runs through the draft from start to finish without node errors and the output of each node can be inspected.
Test the draft on representative documents
Before publishing, run a small set of files that reflect the hardest real cases, such as scanned pages, tables, long policies and files with duplicate titles. Inspect the extracted text and chunk boundaries for each one, then run retrieval questions against the draft index and record which chunks come back. The check passes when extraction is complete enough to answer the test questions and the expected source passages rank in the results. Failures here are cheaper to fix than after users depend on the index.
Publish the pipeline
Publish the pipeline so that it becomes the version used for uploads and new ingestion runs. Publishing fixes the configuration that future documents will pass through, so record the published version and the settings it contains. The step is done when the published version is listed as the active one and a single test file ingested through it produces the same output seen in the draft tests.
Upload the production files
Upload or sync the documents into the knowledge base using the published pipeline. Track the number of files accepted, the files that failed extraction and any that were skipped, because these are the first places where ingestion gaps appear. The check is a reconciliation between the source inventory and the knowledge base, with every failure either fixed and reprocessed or documented with an owner.
Manage and test the knowledge base
Review the indexed documents, confirm that metadata and chunk counts look as expected, and run a fixed set of retrieval questions with known answers. Repeat these tests after any pipeline change or source update. The step closes when the question set returns the expected passages and the test results are saved, giving you a baseline for future changes and an artifact to show reviewers.
What a custom pipeline changes in design, testing and ownership
A custom pipeline turns ingestion into something your team owns, not something Dify handles for you. A ready-to-use knowledge base hides the extraction and chunking steps behind defaults, but a pipeline makes every stage visible: the data source, the extraction step, the processing step and the knowledge storage step. Each of those is a design decision that someone must maintain after go-live. Before you build, name an owner for the orchestration itself, the logic that connects these stages, and record which settings in each node are deliberate choices rather than leftovers from a template.
Dify upgrades are the first recurring test. The Dify docs describe the pipeline as a set of steps, but the processing behavior underneath can change between releases, and the release notes on the Dify releases page are where to check whether a version touches knowledge handling. Plan a regression run that re-ingests a fixed set of representative files, compares chunk output and retrieval results with the previous baseline, and confirms that the data source authorization still works. Confirm with your own test set how long this takes, because the effort depends on your document mix and how many pipelines you run.
Changes to processing logic need a named approver before anyone edits a published pipeline. Decide who can change extraction settings, chunking, metadata handling or the storage target, and require a written record of the reason and the test evidence before a change goes live. Treat the pipeline definition like code: keep exported configuration under version control, so a reviewer can see what changed and roll back to a known state. Ownership also includes the people who notice failures, so assign an operations contact who receives ingestion errors and decides when a pipeline must be paused.
Securing data sources, credentials and outbound requests in a pipeline
A knowledge pipeline touches three trust boundaries: the source systems it reads, the credentials that unlock them, and the network paths it uses to fetch content. The cards below cover each boundary in turn, along with the Dify settings that protect them and the checks to run before a pipeline goes live.
Authorize each data source deliberately
Each data source a pipeline reads needs its own authorization, handled separately from building the pipeline itself. Decide which account the connection runs as, and whether that account can read only the folders or sites the knowledge base actually needs. Confirm how the source revokes access when a team member leaves or a project closes, because a pipeline that keeps syncing after its owner is gone is a common and avoidable exposure.
Protect stored credentials with SECRET_KEY
Source credentials that Dify stores are protected with the instance's SECRET_KEY, which also signs session cookies and JWTs and encrypts OAuth credentials. Generate it before first start and keep it in your secrets manager, not in a shared .env file. Changing it after deployment logs out every user, so treat it as a value to set once and back up with the rest of your configuration.
Decide on workspace encryption key storage
Workspace encryption keys can be stored locally or in Azure Key Vault. Local storage is simpler to run but places the key on the same host as the database. A managed vault separates the key from the data, but adds a dependency and an access policy you must maintain. Ask which option your key management standard requires, and confirm how keys are rotated and recovered before the first source is connected.
Route outbound fetches through SSRF_PROXY
When a pipeline fetches content from URLs or web-based sources, the request leaves Dify over the network. The SSRF_PROXY settings route those outbound requests through a proxy that blocks internal and private IP ranges, which stops a misconfigured source from reaching services on your internal network. Verify that every fetch path in your pipeline actually uses the proxy, not only the default HTTP client.
List sources that need a proxy exception
Some legitimate sources sit on private addresses, such as an internal wiki, a file share or a self-hosted document system. The proxy will block them by default. Build a written list of each internal source, its address, the owner who approves it and the port it uses. Grant exceptions only for those entries, and review the list whenever a source is added, moved or retired, so the exception does not become a standing hole.
Test blocked and allowed fetches
Before go-live, run a short test plan against the pipeline. Confirm that a request to an approved internal source succeeds, that a request to an unlisted private address is refused, and that credentials do not appear in logs or pipeline output. Record the results with the date and the Dify version. Repeat the test after upgrades, since proxy and sandbox behavior has changed between releases and should be checked, not assumed.
Questions teams ask before building a Dify knowledge pipeline
What drives the cost of a Dify knowledge pipeline project?
The main drivers are the number of data sources, how hard the documents are to extract (clean text versus scanned images, tables, forms and mixed layouts), the processing logic you need (cleaning, chunking, metadata tagging, filtering), how many storage and vector targets are involved, and how much testing is required before users rely on the output. Each source adds authorization, mapping and failure handling work. Cost is paid as labor for design, build, testing and handover, plus infrastructure you run yourself. Ask any quote to break these components out and state what is one-time and what recurs, such as upgrades and pipeline changes when source formats shift.
How long does a custom knowledge pipeline take to build?
Duration depends on scope rather than on Dify alone. A single source with plain text files and an existing test set is a much smaller job than several systems with scanned PDFs, access rules and evaluation requirements. Plan time for source access requests, sample review, pipeline design, build, a test pass against real documents, and publication into your environment. Dify's own documented sequence is short (create, orchestrate, publish, upload, then manage and test), so the schedule is usually set by data access and validation. Ask for a timeline tied to a written scope with named milestones.
What must our team provide before the work starts?
Expect to provide representative sample documents across every file type and layout you plan to ingest, including the awkward cases such as scanned pages, tables and documents with restricted content. You also need credentials or service accounts for each data source, a named owner who can approve access and data handling decisions, the target retrieval use cases, and a set of questions with expected answers for testing. Infrastructure access to the Dify environment and the storage or vector targets is also required. Missing samples and slow access approvals are the most common causes of schedule slippage.
Can one internal engineer build a Dify knowledge pipeline alone?
A capable engineer who knows Dify, Docker and the source systems can build a simple pipeline alone, especially with one source and a built-in template as a starting point. The harder parts are usually outside the pipeline canvas: access approvals, handling document permissions, agreeing on chunking and metadata that retrieval depends on, and building an evaluation set that shows whether answers improve. Single-person builds also tend to lack a second reviewer for changes. Decide who will own the pipeline after go-live, who handles failed runs, and who approves changes before deciding between internal and partner work.
When does a pipeline beat the ready-to-use knowledge base?
A pipeline is worth the effort when documents need processing that the default upload path does not cover, such as extracting from a specific source system, applying your own cleaning rules, adding metadata from source records, or routing different document types to different processing steps. If your files are plain, uploaded by hand and need no special handling, the ready-to-use knowledge base is simpler to run. Dify documents the knowledge pipeline as four steps: data sources, data extraction, data processing and knowledge storage. Map your documents to those steps before you choose.
What breaks most often in production knowledge pipelines?
The recurring failures are source credentials that expire, documents with layouts the extraction step misreads, files that exceed size or format limits, and processing changes that alter chunk boundaries so existing answers shift. Pipelines also fail silently when a source returns partial results. Check run logs after each change, keep a fixed evaluation set, and confirm how failed items are retried and reported. Also confirm which storage and vector backends your deployment uses, because the Dify environment reference lists several options for each.
Does DeployOpen handle upgrades and ongoing pipeline changes?
Ongoing support, upgrades and continuous testing are available as retainers, and most engagements are fixed-scope with scope, deliverables and timelines agreed in writing before work starts. Pipelines need attention when Dify releases change the knowledge pipeline behavior, when a source system changes, or when new document types arrive. Dify releases arrive roughly monthly according to its GitHub releases page, so ask how upgrades, regression testing against your evaluation set and rollback will be handled. A quote follows from the written scope.
How DeployOpen scopes and delivers a Dify knowledge pipeline
DeployOpen plans, builds, documents and supports self-hosted open-source platforms inside your own infrastructure, so a Dify knowledge pipeline is designed around your document sources, extraction needs and storage rules. Engagements are fixed-scope, with scope and deliverables agreed in writing before work starts.
How we scope
- Inventory the document sources, file types and owners the pipeline must ingest before choosing a template or blank pipeline
- Record where extracted content and vectors will be stored, and which metadata database and vector store your environment uses
- Agree in writing which data source authorizations, processing steps and knowledge base tests are in the fixed scope
How we build
- Build the pipeline from data source through extraction, processing and knowledge storage, then publish and test it in a non-production workspace first
- Configure outbound access for data source connections through the SSRF proxy settings your security team approves
- Test retrieval on representative documents and record which chunking and index choices were validated and why
How we hand over
- Document the pipeline design, data source configuration, credential ownership and the steps for uploading and reprocessing files
- Deliver a runbook covering upgrades, backups before each change and checks for new variables in the environment example file
- Walk your operators through managing and testing the knowledge base so the team can extend it without our involvement
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer when your team wants a partner for pipeline changes
- Review new Dify releases against your pipeline configuration before you plan an upgrade window
- Confirm support terms, response expectations and included activities with us in the written scope before work begins

