[GitHub Global] Translate Vibe Coding 零基础教程/10 编程工具/工具实战/Dify:零代码 AI 应用开发平台.md to en

This commit is contained in:
yupi-translate-app[bot]
2026-02-05 11:54:58 +00:00
committed by GitHub
parent bfae44ce05
commit 9455460ea4
@@ -2,6 +2,8 @@
> Build your AI applications visually > Build your AI applications visually
Hello, I'm Yupi. Hello, I'm Yupi.
In previous articles, we learned about no-code platforms like Bolt.new and Baidu Miaoda for quickly generating websites and applications. But what if you want to create AI applications, such as intelligent customer service, knowledge base Q&A, or AI assistants? What tools should you use? In previous articles, we learned about no-code platforms like Bolt.new and Baidu Miaoda for quickly generating websites and applications. But what if you want to create AI applications, such as intelligent customer service, knowledge base Q&A, or AI assistants? What tools should you use?
@@ -10,13 +12,15 @@ In this article, I'll introduce **Dify**, a no-code platform specifically design
Let me walk you through how to use Dify with practical examples, while also explaining some core AI concepts along the way. Let me walk you through how to use Dify with practical examples, while also explaining some core AI concepts along the way.
## 1. What is Dify? ## 1. What is Dify?
[Dify](https://dify.ai/) is an open-source AI application development platform that allows you to build AI applications visually. [Dify](https://dify.ai/) is an open-source AI application development platform that allows you to build AI applications visually.
How is it different from Bolt.new? How is it different from Bolt.new?
Bolt.new is mainly used to generate regular websites and applications, such as personal homepages or e-commerce sites. Dify, on the other hand, specializes in AI applications, including: Bolt.new is mainly used to generate regular websites and applications, such as personal homepages or e-commerce sites. Dify, on the other hand, focuses on AI applications, including:
- Intelligent customer service chatbots - Intelligent customer service chatbots
- Knowledge base Q&A systems - Knowledge base Q&A systems
@@ -28,21 +32,27 @@ Dify provides a visual configuration interface where you can build AI workflows
![](https://pic.yupi.icu/1/853427c8123decb5ea3d163ae3bb8ab635d95e92f7ee14a2e51e54df06e94fd8.png) ![](https://pic.yupi.icu/1/853427c8123decb5ea3d163ae3bb8ab635d95e92f7ee14a2e51e54df06e94fd8.png)
## 2. Getting Started with Dify Quickly
## 2. Getting Started with Dify
Let me guide you through a practical example to quickly get started with Dify. Let me guide you through a practical example to quickly get started with Dify.
### 1. Create an AI Application ### 1. Create an AI Application
First, go to the [Dify platform](https://dify.ai/), register an account, and log in. Then create an AI application and enter the AI conversation interface. First, go to the [Dify platform](https://dify.ai/), register an account, and log in. Then create an AI application and enter the AI chat interface.
![](https://pic.yupi.icu/1/1743560753186-1e9452e6-0d38-4070-b369-c674bc418c91.png) ![](https://pic.yupi.icu/1/1743560753186-1e9452e6-0d38-4070-b369-c674bc418c91.png)
### 2. Choose a Large Model ### 2. Choose a Large Model
For first-time use, we need to select a **large model (LLM)**. For first-time use, we need to select a **large model (LLM)**.
**Large models are the brains of AI**, referring to artificial intelligence models with massive parameters that acquire extensive knowledge and capabilities through large-scale pre-training. **Large models are the brains of AI**, referring to artificial intelligence models with massive parameters that acquire broad knowledge and capabilities through large-scale pre-training.
![](https://pic.yupi.icu/1/1743560803824-ab33d9d9-e994-45e5-8190-fc104e679747.png) ![](https://pic.yupi.icu/1/1743560803824-ab33d9d9-e994-45e5-8190-fc104e679747.png)
@@ -52,16 +62,18 @@ Different large models vary in parameter size, processing power, and supported c
After selecting a large model, we can adjust its output by setting parameters. For example, **temperature** controls the randomness of the model's output: After selecting a large model, we can adjust its output by setting parameters. For example, **temperature** controls the randomness of the model's output:
- Higher temperature values result in more random and diverse outputs (suitable for creative writing) - Higher temperature values make the output more random and diverse (suitable for creative writing)
- Lower temperature values produce more deterministic and conservative outputs (suitable for professional Q&A) - Lower temperature values make the output more deterministic and conservative (suitable for professional Q&A)
![](https://pic.yupi.icu/1/1743560855583-7efaebb7-3552-4a5b-9787-adbb9acaddc6.png) ![](https://pic.yupi.icu/1/1743560855583-7efaebb7-3552-4a5b-9787-adbb9acaddc6.png)
### 3. Set Prompts ### 3. Set Prompts
Next, we'll engage in a conversation with the AI. The input we provide to the AI is called a **prompt**, which guides the model to generate specific content or perform certain tasks. Next, let's engage in a conversation with the AI. The input we provide to the AI is called a **prompt**, which guides the model to generate specific content or perform certain tasks.
The quality of the prompt directly determines the accuracy of the AI's output. Prompts can be divided into two types: The quality of prompts directly determines the accuracy of the AI's output. Prompts can be divided into two types:
- System prompts: Overall constraints on the AI's output, set in advance - System prompts: Overall constraints on the AI's output, set in advance
- User prompts: Content input by users on the fly - User prompts: Content input by users on the fly
@@ -72,10 +84,12 @@ For example, if I want to create a programming assistant, I can set the system p
``` ```
You are a professional programming assistant proficient in Python, JavaScript, Java, and other languages. You are a professional programming assistant proficient in Python, JavaScript, Java, and other languages.
Provide concise and clear answers with code examples. Provide concise answers with code examples when responding to questions.
``` ```
Then users can directly ask: "How to read a file in Python?" Users can then directly ask: "How do I read a file in Python?"
### 4. Understanding Tokens ### 4. Understanding Tokens
@@ -87,15 +101,17 @@ Seeing "cost" might make some nervous—what are Tokens? Are they expensive?
**Tokens are the basic units of text processed by large language models**, which could be words or punctuation marks. Both input and output are calculated in Tokens. Generally, more Tokens mean higher costs and slower output speeds. **Tokens are the basic units of text processed by large language models**, which could be words or punctuation marks. Both input and output are calculated in Tokens. Generally, more Tokens mean higher costs and slower output speeds.
Different models have varying pricing, typically costing tens of dollars per million Tokens. You can use online Token calculators to estimate costs. Different models have varying pricing, typically around a few dozen dollars per million Tokens. You can use online Token calculators to estimate costs.
![](https://pic.yupi.icu/1/1743561097206-472514a9-3d13-4408-b222-2207b00f611a.png) ![](https://pic.yupi.icu/1/1743561097206-472514a9-3d13-4408-b222-2207b00f611a.png)
But don't worry too much—daily usage costs are usually low, and many platforms offer free quotas. Don't worry too much, though—daily usage costs are usually low, and many platforms offer free quotas.
### 5. Add a Knowledge Base (RAG) ### 5. Add a Knowledge Base (RAG)
Sometimes, large models may lack certain information. For example, if you ask AI to summarize [Yupi's "Ultimate Resume Writing Guide"](https://www.codefather.cn/course/cv), the information might be inaccurate because the AI hasn't read the article. Sometimes, large models may lack certain information. For example, if you ask the AI to summarize [Yupi's "Ultimate Resume Writing Guide"](https://www.codefather.cn/course/cv), the information might be inaccurate because the AI hasn't read the article.
In such cases, we can enable the knowledge base feature, which uses **RAG (Retrieval-Augmented Generation)** technology to supplement the AI's knowledge with external sources. In such cases, we can enable the knowledge base feature, which uses **RAG (Retrieval-Augmented Generation)** technology to supplement the AI's knowledge with external sources.
@@ -105,57 +121,63 @@ First, create a knowledge base and upload documents:
![](https://pic.yupi.icu/1/1743561783744-1ddce7bb-802e-4feb-9e8f-7e0a83b4ad98.png) ![](https://pic.yupi.icu/1/1743561783744-1ddce7bb-802e-4feb-9e8f-7e0a83b4ad98.png)
Then segment the text, setting your own chunking rules: Then split the text into chunks, where you can set the segmentation rules:
![](https://pic.yupi.icu/1/1743561816205-22494e52-c011-49fe-8537-3b7f0f441a51.png) ![](https://pic.yupi.icu/1/1743561816205-22494e52-c011-49fe-8537-3b7f0f441a51.png)
Next, use **Embedding** technology to convert text into vector representations and store them in a vector database. Next, use **Embedding** technology to convert text into vector representations and store them in a vector database.
When a user asks a question, the question is converted into a vector, and relevant information is retrieved from the knowledge base. This information, along with the question, is then fed into the large model for processing, making the AI's answers more accurate. When a user asks a question, the question is converted into a vector, and relevant information is retrieved from the knowledge base. This information, along with the question, is then fed into the large model for processing, making the AI's responses more accurate.
![](https://pic.yupi.icu/1/1743561872916-7971c368-14bd-49c2-9bd9-604973f469e3.png) ![](https://pic.yupi.icu/1/1743561872916-7971c368-14bd-49c2-9bd9-604973f469e3.png)
This way, the AI can answer questions based on your provided knowledge base. This way, the AI can answer questions based on your provided knowledge base.
### 6. Publish and Call ### 6. Publish and Call
Now, our AI application is complete. You can publish it for others to use or call it via **API interfaces** in your own code programs through network requests. Now, our AI application is ready. You can publish it for others to use or call it via **API interfaces** in your own code programs through network requests.
![](https://pic.yupi.icu/1/1743561915955-ad27735a-c927-4207-b769-03fda32081b6.png) ![](https://pic.yupi.icu/1/1743561915955-ad27735a-c927-4207-b769-03fda32081b6.png)
## 3. AI Agents and Workflows ## 3. AI Agents and Workflows
So far, we've only created a simple chat assistant. But Dify also supports more powerful features—**AI agents**. So far, we've only created a simple chat assistant. But Dify also supports more powerful features—**AI agents**.
Agents are AI systems that can perceive environments, reason, plan, make decisions, and autonomously take actions to achieve goals. Agents are AI systems that can perceive environments, reason, plan, make decisions, and take autonomous actions to achieve goals.
![](https://pic.yupi.icu/1/1743561972671-9c7ad13e-a467-4a08-ba14-711d4640939c.png) ![](https://pic.yupi.icu/1/1743561972671-9c7ad13e-a467-4a08-ba14-711d4640939c.png)
We can provide agents with **tools**, such as web search, weather queries, database calls, etc., enabling them to perform more complex tasks. We can equip agents with **tools**, such as web search, weather queries, database calls, etc., enabling them to perform more complex tasks.
After installing tools, the agent will use them when needed. For example, it might retrieve content from the web, summarize it, and then reply. This expands the AI's application scope and capabilities infinitely. After installing tools, provide them to the agent, and it will use them when needed. For example, it might retrieve content from the web, summarize it, and then respond. This expands the AI's application scope and capabilities infinitely.
![](https://pic.yupi.icu/1/1743562005435-e5ece3f2-5f4b-4729-b490-a1e51f1f006e.png) ![](https://pic.yupi.icu/1/1743562005435-e5ece3f2-5f4b-4729-b490-a1e51f1f006e.png)
Of course, if your AI model isn't smart enough, it might not use tools effectively. I recommend using more capable reasoning models for agents. Of course, if your AI model isn't smart enough, it might not use tools effectively. I recommend using more capable reasoning models for agents.
Some models employ **Chain-of-Thought (CoT)** and **ReAct** techniques, where the model first thinks about the problem, analyzes it, proposes an action plan, acts, and then further reasons based on results. The intermediate steps and reasoning processes are visible, helping us understand how the model reaches conclusions. Some models employ **Chain-of-Thought (CoT)** and **ReAct** techniques, where the model first thinks about the problem, analyzes it, proposes an action plan, acts, and then further reasons based on the results. The intermediate steps and thought processes are visible, helping us understand how the model reaches its conclusions.
![](https://pic.yupi.icu/1/1743562152661-80fabf5f-07a4-4463-a980-67da980f0ede.png) ![](https://pic.yupi.icu/1/1743562152661-80fabf5f-07a4-4463-a980-67da980f0ede.png)
Sometimes, a single agent can't complete tasks like automatically generating 100 short videos or creating and publishing a game. Sometimes, a single agent can't complete tasks like automatically generating 100 short videos or creating and publishing a game.
In such cases, we can use **agent workflows** (Agentic Workflow), which allow agents to combine functions through planning and orchestration, automating complex tasks—similar to visual programming. In such cases, we can use **agent workflows** (Agentic Workflow), where agents are planned and orchestrated to combine functionalities and automate complex tasks—similar to visual programming.
![](https://pic.yupi.icu/1/1743562195750-57a3b344-4282-4279-bd71-510f60fc17c6.png) ![](https://pic.yupi.icu/1/1743562195750-57a3b344-4282-4279-bd71-510f60fc17c6.png)
## 4. MCP Service Integration ## 4. MCP Service Integration
Finally, let's discuss a trending concept: **MCP (Model Context Protocol)**, a standardized protocol for AI interactions with external tools or data. Finally, let's discuss a trending concept: **MCP (Model Context Protocol)**, a standardized protocol for AI interactions with external tools or data.
![](https://pic.yupi.icu/1/1743562215479-a19f8b1c-0190-41b4-8a2f-f508b24e74a7.png) ![](https://pic.yupi.icu/1/1743562215479-a19f8b1c-0190-41b4-8a2f-f508b24e74a7.png)
Simply put, MCP services make it easier to integrate various tools and data into AI, enhancing application capabilities. Simply put, MCP services make it easier to integrate various tools and data into AI applications, enhancing their functionality.
First, install the MCP Agent policy to enable agents to call MCP: First, install the MCP Agent policy to enable agents to call MCP:
@@ -165,71 +187,16 @@ Then, visit the [MCP Directory](https://mcp.so/) to find needed MCP services, su
![](https://pic.yupi.icu/1/1743562325916-dbef66dc-d0d1-4a60-9bed-68691c462677.png) ![](https://pic.yupi.icu/1/1743562325916-dbef66dc-d0d1-4a60-9bed-68691c462677.png)
Back in the agent workflow, fill in the MCP server address, invocation commands, query conditions, etc. The AI can then send requests to MCP to fetch data when needed. Back in the agent workflow, fill in the MCP server address, invocation instructions, and query conditions. The AI can then send requests to MCP to fetch data when needed.
![](https://pic.yupi.icu/1/1743562400230-79c99317-98f1-4579-8884-a5bf53623683.png) ![](https://pic.yupi.icu/1/1743562400230-79c99317-98f1-4579-8884-a5bf53623683.png)
## 5. Other AI Application Development Platforms ## 5. Other AI Application Development Platforms
Besides Dify, here are some other notable AI application development platforms. Besides Dify, here are some other notable AI application development platforms.
### Coze ### Coze
[Coze](https://www.coze.com/) is an AI application development platform by ByteDance, offering numerous plugins for easy app development. [Coze](https://
Coze's strengths are no-code, visual workflows, and many pre-built plugins and templates, making it quick to learn. Ideal for individuals and lightweight applications.
### Alibaba Cloud Bailian
[Alibaba Cloud Bailian](https://bailian.console.aliyun.com/) is an enterprise-grade AI application development platform supporting RAG knowledge bases, workflow orchestration, and more.
Bailian's strengths are enterprise-level capabilities, visual workflow orchestration, and deep integration with other Alibaba Cloud services, making it suitable for businesses.
### How to Choose?
If you're an individual developer or lack coding experience and want to quickly build an AI application, Dify and Coze are great choices.
For enterprise users or Java developers needing stability and enterprise features, consider Alibaba Cloud Bailian.
I primarily use Alibaba Cloud Bailian because, as a full-stack Java developer, Alibaba's dominance in China's Java ecosystem is unmatched. Their Spring AI Alibaba framework integrates seamlessly with their AI services, enabling rapid development of complete AI applications.
## 6. Dify Practical Tips
Here are some practical tips I've gathered while using Dify.
1. Choose the right large model
Different tasks suit different models. For creative writing, GPT-4 or Claude; for code generation, Claude excels; for budget constraints, DeepSeek or Gemini Flash.
2. Optimize prompts
Prompt quality directly affects AI output. Recommendations:
- Define roles clearly (e.g., "You are a professional...")
- Specify task requirements clearly
- Provide concrete examples
- Set output formats
3. Leverage knowledge bases
If your AI application needs to answer questions based on specific knowledge, use the knowledge base feature. Upload relevant documents to ensure accurate answers.
4. Test and iterate
After building an AI application, test extensively. Try various questions and adjust prompts or knowledge bases based on results.
5. Use workflows
For complex tasks, use workflows. Break tasks into steps, each handling a subtask, then combine them. This improves control and debugging.
## Final Thoughts
By now, you should have a basic understanding of Dify and AI application development.
**Building AI applications with Dify is truly simple.** No coding is needed—just configure settings to create powerful AI applications.
Through using Dify, you'll also grasp core AI concepts like large models, prompts, Tokens, RAG, and agents. These concepts are useful not just in Dify but across other AI tools.
I recommend trying Dify to build a simple AI application, such as a programming Q&A assistant, document summarizer, or knowledge base Q&A system. You'll soon discover the joy of AI development.
## Recommended Resources
1) Yupi's AI Navigation Site: [AI resource directory, latest AI news, free AI tutorials](https://ai.codefather.cn)
2) Programming Navigation Learning Circle: [Learning paths, tutorials, projects, job guides, Q&A](https://www.codefather.cn)
3) Programmer Interview Cheatsheets: [Internship/campus/social recruitment FAQs, company interview questions](https://www.mianshiya.com)
4) Programmer Resume Builder: [Professional templates, rich examples, interview prep](https://www.laoyujianli.com)
5) 1-on-1 Mock Interviews: [Essential for internship/campus/social recruitment offers](https://ai.mianshiya.com)