Replies: 8 comments 5 replies
-
Currently I do something similar with 2 workflows transformed as tools. I call them "KB Upsert" and "KB Embed Doc"
KB Embed Doc:
By now it should be clear what my point is... What about retrieval?This new pipeline simplifies document embedding, but keeps a wrong concept of the previous RAG: It would be useful in the KB retrieval node to be able to change retrieval configuration by choosing at least the top K value without altering it for any other retrieval node that uses the same KB. As I've suggested in ehancement issues, we get parameters and customization for LLM models used in text generation, but there are parameters for Embedding and Reranking models too, to alter how the model performs, I've already mentioned in the past the Matryoshka settings Another improvement:It should be possible to trigger the pipeline by API and by trigger nodes (when implemented) to allow a pipeline to use the HTTP node / any other node, including workflows as tool (deep search workflow) to gather data to embed. More RAG methodsWill you implement Graph RAG ? |
Beta Was this translation helpful? Give feedback.
-
In the future improvements you included:
What is needed in sub workflows and workflow as tool? |
Beta Was this translation helpful? Give feedback.
-
With knowledge pipeline being added to DIFY, you guys should consider improving the retrieval part as well. Being limited to max of 10 retrieved chunk is limiting. I am sure there are a lot of retrieval methods in space of RAG. |
Beta Was this translation helpful? Give feedback.
-
How about insert/upsert metadata ? with the v1.8.x i do it with my custom python code and using Dify KB API, but do you plan to integrate metadata management workflow in the future ? (metadata from my part is almost as important as chunking for retrieval part) |
Beta Was this translation helpful? Give feedback.
-
chatflow无法访问sys.query。报错:Run failed: cannot access local variable 'curr_message_tokens' where it is not associated with a value。 |
Beta Was this translation helpful? Give feedback.
-
Parallel iteration does not seem to be working anymore. Enabling parallelism will execute one iteration at a time. Note: My env variables are unchanged since v1.8.1 |
Beta Was this translation helpful? Give feedback.
-
I've tried it, but it still doesn't work.
RayzZZ
***@***.***
原始邮件
发件人:Reymond Pamelar ***@***.***>
发件时间:2025年9月9日 00:58
收件人:langgenius/dify ***@***.***>
抄送:Ray ***@***.***>, Comment ***@***.***>
主题:Re: [langgenius/dify] v2.0.0-beta.1 – Orchestrating Knowledge, Powering Workflows (Discussion #25176)
your max retrieved chunks can be adjusted within the environment variables. I believe its:
TOP_K_MAX_VALUE: '100'
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.
|
Beta Was this translation helpful? Give feedback.
-
Congratulations on shipping Dify 2.0! The release looks fantastic and the improvements are much appreciated. Could you please share when the Human-in-the-Loop capability is expected to be available (beta or GA)? Even a rough window would help us plan our rollout. Many thanks for all the great work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🚀 Introduction
In Dify 2.0, we are introducing two major new capabilities: the Knowledge Pipeline and the Queue-based Graph Engine.
This is a beta release, and we hope to explore these improvements together with you and gather your feedback. The Knowledge Pipeline provides a modularized and extensible workflow for knowledge ingestion and processing, while the Queue-based Graph Engine makes workflow execution more robust and controllable. We believe these will help you build and debug AI applications more smoothly, and we look forward to your experiences to help us continuously improve.
📚 Knowledge Pipeline
✨ Introduction
With the brand-new orchestration interface for knowledge pipelines, we introduce a fundamental architectural upgrade that reshapes how document processing are designed and executed, providing a more modular and flexible workflow that enables users to orchestrate every stage of the pipeline. Enhanced with a wide range of powerful plugins available in the marketplace, it empowers users to flexibly integrate diverse data sources and processing tools. Ultimately, this architecture enables building highly customized, domain-specific RAG solutions that meet enterprises’ growing demands for scalability, adaptability, and precision.
❓ Why Do We Need It?
Previously, Dify's RAG users still encounter persistent challenges in real-world adoption — from inaccurate knowledge retrieval and information loss to limited data integration and extensibility. Common pain points include:
All of them lead to poor answer quality and hinder the model's overall performance.
In response, we reimagined RAG in Dify as an open and modular architecture, enabling developers, integrators, and domain experts to build document processing pipelines tailored to their specific requirements—from data ingestion to chunk storage and retrieval.
🛠️ Core Capabilities
🧩 Knowledge Pipeline Architecture
The Knowledge Pipeline is a visual, node-based orchestration system dedicated to document ingestion. It provides a customizable way to automate complex document processing, enabling fine-grained transformations and bridging raw content with structured, retrievable knowledge. Developers can build workflows step by step, like assembling puzzle pieces, making document handling easier to observe and adjust.
📑 Templates & Pipeline DSL
🔌 Customizable Data Sources & Tools
Each knowledge base can support multiple data sources. You can seamlessly integrate local files, online documents, cloud drives, and web crawlers through a plugin-based ingestion framework. Developers can extend the ecosystem with new data-source plugins, while marketplace processors handle specialized use cases like formulas, spreadsheets, and image parsing — ensuring accurate ingestion and structured representation.
🧾 New Chunking Strategies
In addition to General and Parent-Child modes, the new Q&A Processor plugin supports Q&A structures. This expands coverage for more use cases, balancing retrieval precision with contextual completeness.
🖼️ Image Extraction & Retrieval
Extract images from documents in multiple formats, store them as URLs in the knowledge base, and enable mixed text-image outputs to improve LLM-generated answers.
🧪 Test Run & Debugging Support
Before publishing a pipeline, you can:
This provides safe iteration and debugging at every stage.
🔄 One-Click Migration from Legacy Knowledge Bases
Seamlessly convert existing knowledge bases into the Knowledge Pipeline architecture with a single action, ensuring smooth transition and backward compatibility.
🌟 Why It Matters
The Knowledge Pipeline makes knowledge management more transparent, debuggable, and extensible. It is not the endpoint, but a foundation for future enhancements such as multimodal retrieval, human-in-the-loop collaboration, and enterprise-level data governance. We’re excited to see how you apply it and share your feedback.
⚙️ Queue-based Graph Engine
❓ Why Do We Need It?
Previously, designing workflows with parallel branches often led to:
These issues reduced the usability of complex workflows. To solve this, we redesigned the execution engine around queue scheduling, improving management of parallel tasks.
🛠️ Core Capabilities
📋 Queue Scheduling Model
All tasks enter a unified queue, where the scheduler manages dependencies and order. This reduces errors in parallel execution and makes topology more intuitive.
🎯 Flexible Execution Start Points
Execution can begin at any node, supporting partial runs, resumptions, and subgraph invocations.
🌊 Stream Processing Component
A new ResponseCoordinator handles streaming outputs from multiple nodes, such as token-by-token LLM generation or staged results from long-running tasks.
🕹️ Command Mechanism
With the CommandProcessor, workflows can be paused, resumed, or terminated during execution, enabling external control.
🧩 GraphEngineLayer
A new plugin layer that allows extending engine functionality without modifying core code. It can monitor states, send commands, and support custom monitoring.
Quickstart
2.0.0-beta.1
or higherDEBUG=true
to enable DebugLoggingLayer.WORKFLOW_MAX_EXECUTION_STEPS=500
WORKFLOW_MAX_EXECUTION_TIME=1200
WORKFLOW_CALL_MAX_DEPTH=10
WORKFLOW_MIN_WORKERS=1
WORKFLOW_MAX_WORKERS=10
WORKFLOW_SCALE_UP_THRESHOLD=3
WORKFLOW_SCALE_DOWN_IDLE_TIME=30
More Controllable Parallel Branches
Example: Command Mechanism
Note: pause/resume functionality will be supported in future versions.
Example: GraphEngineLayer
GraphEngineLayer Example
FAQ
Is this release focused on performance?
No. The focus is on stability, clarity, and correctness of parallel branches. Performance improvements are a secondary benefit.
What events can be subscribed to?
How can I debug workflow execution?
DEBUG=true
to view detailed logs.Future Plans
This beta release is just the beginning. Upcoming improvements include:
We look forward to your feedback and experiences to make the engine more practical.
Upgrade Guide
Important
After upgrading, you must run the following migration to transform existing datasource credentials. This step is required to ensure compatibility with the new version:
Docker Compose Deployments
tar -cvf volumes-$(date +%s).tgz volumes
docker exec -it docker-api-1 uv run flask transform-datasource-credentials
Source Code Deployments
Stop the API server, Worker, and Web frontend Server.
Get the latest code from the release branch:
cd api uv sync
This discussion was created from the release v2.0.0-beta.1 – Orchestrating Knowledge, Powering Workflows.
Beta Was this translation helpful? Give feedback.
All reactions