With Dify, you can integrate your corporate or personal knowledge base into large language model (LLM) applications to create highly customized AI Q&A solutions. You can then integrate these solutions into your business to improve R&D and management efficiency. Additionally, deploying Dify on a Container Compute Service (ACS) cluster enables seamless scaling to meet fluctuating business demands and accelerate your growth.
Solution overview
|
Dify custom AI application example
|
Web-integrated AI application example
|
Set up a dedicated AI Q&A assistant in just three steps:
-
Install the ack-dify component: Create an ACS cluster and install the ack-dify component.
-
Add an AI Q&A assistant: Access Dify and add an AI Q&A assistant to your website.
-
Customize the AI Q&A assistant: Prepare a dedicated knowledge base so the AI assistant can answer questions it could not answer accurately before, helping you handle professional inquiries more effectively.
Introduction to Dify
Dify is an open-source large language model (LLM) application development platform that combines Backend-as-a-Service (BaaS) and LLMOps. It enables both developers and non-technical users to build production-grade generative AI applications without reinventing core components.
Key components of Dify's architecture:
-
Core technology components: Dify integrates essential components for creating LLM applications, including compatibility with numerous models, a user-friendly prompt design interface, a high-performance Retrieval-Augmented Generation (RAG) system, and a customizable Agent architecture.
-
Visual orchestration and operations: Dify's intuitive interface enables visual orchestration of prompts, streamlined operational workflows, and efficient management of datasets. This significantly accelerates the AI application development process, allowing developers to deploy quickly or integrate LLMs into existing systems, and supports continuous operational optimization.
-
Application templates and orchestration framework: Dify provides developers with out-of-the-box application templates and an orchestration framework, enabling them to rapidly develop generative AI applications based on large language models. The platform also supports instant, smooth scaling to meet changing business needs, driving business growth.
Together, these components provide a comprehensive platform for rapidly developing and deploying generative AI applications.
1. Install the ack-dify component
If you are already familiar with creating ACS clusters, you can proceed to create a cluster that suits your business needs.
1.1 Prerequisites
-
An ACS cluster of version 1.26 or later.
-
Follow the steps to configure a dynamic NAS volume.
-
Create a StorageClass.
-
Create a PersistentVolumeClaim (PVC).
-
1.2 Deploy the component
Deploy the ack-dify component on your cluster for the Dify service.
-
Log on to the Container Compute Service (ACS) console and choose Clusters from the left-side navigation pane. Click the name of the target cluster to go to its details page.
You do not need to configure the Application Name and Namespace for the component. After you click Next, a Confirm dialog box appears. Click Yes to use the default application name (ack-dify) and namespace (dify-system). Then, set Chart Version to 1.1.5 and click OK to complete the installation of the ack-dify component.
On the cluster details page, in the left navigation bar, click Applications > Helm. On the Helm page, click the Create button. In the Create panel, on the Application Scenarios tab, select AIGC/LLM, and then select the ack-dify Chart.
-
Wait about one minute and run the following command. When all Pods in the
dify-systemnamespace are in theRunningstate, the ack-dify component is installed.kubectl get pod -n dify-systemIf you find that a Pod is in the Pending state, your cluster may be missing the PVC dependency required by ack-dify. In this case, create a NAS StorageClass for the cluster as described in Prerequisites. For more information about how to troubleshoot Pod exceptions, see Troubleshoot Pod exceptions.
2. Add an AI Q&A assistant
2.1 Access the Dify service
-
Enable public access for the ack-dify service.
NotePublic access is for demonstration purposes. For data security in a production environment, enable the Access Control feature.

-
After configuration, choose Network > Services > ack-dify, set the namespace to dify-system. You will see the External IP of the ack-dify service. Open this IP in your browser to access Dify.

-
Register an account.
Access the External IP and follow the prompts to create an administrator account (email, username, password).

2.2 Create an AI Q&A assistant
-
Enter the External IP in your browser and log in to the Dify platform.
-
Add an AI model (Qwen in this example) and set the API key from Alibaba Cloud. See the figure below:
Once you exhaust the free Qwen quota, charges are based on token usage. This reduces upfront costs compared to self-hosting a model.
-
Get API key: Choose Username > Settings > Model Provider > Install and set up the Qwen plugin > Get API Key From Alibaba Cloud.
-
Enter the API key, then click Save.

-
-
Create a general-purpose AI Q&A assistant.
Choose Studio > Create from Blank, and enter a Name and Description for the assistant. Keep other parameters at defaults.

2.3 Verify the AI Q&A assistant
Test the assistant by asking questions. The general-purpose chatbot handles simple conversations but cannot yet answer Dify-specific questions.

3. Customize the AI assistant
3.1 Create a knowledge base
To answer Dify-related technical questions accurately, configure a dedicated knowledge base for the assistant.
This example provides a corpus file dify_doc.md. Create and upload the knowledge base as follows.
-
Upload the prepared corpus file dify_doc.md to the knowledge base.
Choose Knowledge > Create Knowledge > Import from file > Select File > Next.

-
Click Next. Perform text segmentation and cleaning, then save.
Keep defaults. The knowledge base automatically cleans, segments, and indexes the document for retrieval.
To learn how the above corpus files are organized into a single .md file, expand the collapsible section below for details.
3.2 Orchestrate and publish the assistant
Configure a prompt and add the knowledge base to the assistant's context.
-
Configure the prompt: Copy the following content into the Instructions field. Prompts improve response accuracy with instructions and constraints.
You will act as Dify's AI assistant, dedicated to answering customers' questions about Dify products and their features. Your responses should be based on the existing knowledge base to ensure accuracy. If a question is beyond your knowledge, please honestly inform them that you do not know the answer, in order to maintain the integrity of the information. Please communicate in a friendly and warm tone, and feel free to use emoticons appropriately to enhance the interactive experience. -
Add the knowledge base to the context: Click Add in the Context area to add the knowledge base, enabling accurate and professional answers.
-
Click Releases > Update to save and apply the configuration.
The configuration is shown in the following figure:

3.3 Verify the results
With a dedicated knowledge base, the AI assistant provides more accurate, domain-specific answers than the general-purpose chatbot.
Summary
Core Dify features:
|
Feature |
Description |
|
Comprehensive LLMOps |
Real-time monitoring of application logs and metrics, with continuous optimization of prompts, datasets, and models based on production data. |
|
RAG engine |
End-to-end RAG pipeline from document ingestion to retrieval. Processes common formats such as PDF and PPT directly. |
|
Agent |
Define agents using LLM function calling or the ReAct paradigm, with 50+ built-in tools and support for custom tools. |
|
workflow orchestration |
Visual canvas for building AI workflows by dragging and connecting components, with minimal coding. |
|
observability |
Track and evaluate the quality and cost of LLM applications through a monitoring dashboard. |
|
Enterprise features (SSO/access control) |
Organizations can reduce the risk of information leakage and data damage, ensuring information security and business continuity. |
Going to production
Four options for deploying the AI Q&A assistant to production:
-
Publicly shared website.
The AI application you create with Dify can be published as a web application accessible on the internet, which will operate based on your prompt and orchestration settings. For more information, see Publish as a public web app.
-
API-based calls.
Dify provides APIs for all applications based on the "Backend-as-a-Service" concept, allowing developers to leverage the power of large language models in their front-end applications without worrying about complex back-end architecture and deployment. For more information, see Develop with APIs.
-
Redevelopment based on front-end components.
If you are developing a new product from scratch or are in the prototype design phase, use Dify to quickly publish an AI site. For more information, see Redevelop based on front-end components.
-
Embedding in your enterprise or personal website.
Dify supports embedding your AI application into your business website. Use this capability to create an official AI customer service, business Q&A, and other applications with your business data in minutes. For more information, see Embed in a website.

