English translation
Load the dataset
Mastering Dify’s fundamental operations goes beyond clicking a few buttons. We’ll break it down into a clear workflow: first create an application; then configure the model and variables; next integrate a knowledge base or tools; and finally publish it for real users to test.
For every application you build, write one concise line of description: What problem does it solve? Which materials does it use? Who is responsible for acceptance? As your number of applications grows, this single-line summary will help prevent your workspace from turning into a cluttered storage room.
In the previous article, we set up and verified the environment for Dify—the generative AI application innovation engine—ensuring smooth platform access. In this tutorial, we’ll dive deep into Dify’s core operations, helping you understand how to efficiently leverage its foundational features.
Dify Interface Overview
Let’s begin with a quick tour of Dify’s user interface. Dify’s UI is intuitive and consists primarily of the following components:
When learning Dify’s foundational capabilities, follow this sequence: create an app → select a model → write a prompt → run a test → save and publish. Only after completing this full cycle should you introduce more complex nodes.
- Sidebar — Provides quick access to key functional modules, such as Model Management, Data Upload, and Task Management.
- Workspace — Displays detailed information and status for your current operation, allowing you to monitor progress and view results.
- Status Bar — Shows real-time operation status, system notifications, and contextual prompts.
Once you’re familiar with these interface elements, you’re ready to start using Dify’s core features.
Creating and Managing Datasets
Before using Dify, you typically need to either create or upload datasets. Below are the steps to create a dataset:
You don’t need to absorb all details of “Dify Core Operations: A Primer on Basic Usage” at once. Start with a small, hands-on problem you can verify immediately—then use the diagrams and text to fill in conceptual gaps.
1. Uploading a Dataset
Navigate to the Dataset Management module via Dify’s sidebar, then click Upload Dataset and select your file. Supported formats include CSV and JSON. After confirmation, Dify automatically parses the data and generates a preview.
2. Previewing and Editing a Dataset
Once uploaded, click on the dataset in Dataset Management to preview it. Dify provides a user-friendly interface enabling you to:
- View basic metadata (e.g., row count, column names, data types)
- Perform data cleaning and preprocessing—such as removing null values or filtering out noise
Example Code
Here’s a simple Python code snippet demonstrating how to load and preprocess a CSV dataset:
import pandas as pd
# Load the dataset
data = pd.read_csv('data.csv')
# Display the first five rows
print(data.head())
# Drop rows containing null values
data = data.dropna()
# Filter rows based on a condition
filtered_data = data[data['column_name'] > threshold]
Executing Core Features
Now that you understand dataset management, let’s move on to foundational model operations. Using Dify’s built-in features, you can train models, evaluate performance, and more.
1. Training a Model
From the sidebar, go to Model Management, then click Train Model. You’ll need to specify the following:
- Select Dataset: Choose from previously uploaded datasets.
- Select Model Type: Dify supports multiple model types—including classification and regression.
- Configure Parameters: Adjust hyperparameters such as learning rate, number of epochs, and batch size.
2. Evaluating a Model
After training completes, evaluate your model directly in Dify. The platform automatically computes key metrics—including accuracy, recall, and others—and displays scores. Within the evaluation interface, you can also generate visual charts to analyze model behavior.
If you haven’t fully internalized “Dify Core Operations: A Primer on Basic Usage,” revisit this card and walk through its four actions step-by-step.
When reviewing “Dify Core Operations: A Primer on Basic Usage,” avoid launching large-scale projects right away. Instead, validate the core workflow using a single, simple example.
Summary and Next Steps
In this tutorial, we thoroughly covered Dify’s core operations—including dataset management, model training, and evaluation. Mastering these fundamentals lays a solid foundation for everything that follows.
In the next tutorial, we’ll guide you through building your very first AI model—complete with practical examples and step-by-step instructions. Stay tuned!
Continue