Actions30
- Dataset Actions
- Document Actions
- Segment Actions
- Metadata Actions
Dataset → Create
AI-generatedOverview
The node "Dify Knowledge Base" allows users to manage AI knowledge base datasets, documents, segments, and metadata through various CRUD (Create, Read, Update, Delete) operations. Specifically, the Dataset Create operation enables creating a new dataset within the Dify AI knowledge base system.
This node is beneficial in scenarios where you want to programmatically organize and manage collections of data (datasets) for AI-powered search, retrieval, or embedding tasks. For example, you might use it to create a dataset that will later be populated with documents or segments for semantic search applications, knowledge management, or AI training purposes.
Practical examples include:
- Creating a dataset to store company internal documents for semantic search.
- Setting up datasets with specific embedding models and indexing techniques for optimized AI retrieval.
- Managing access permissions on datasets shared across team members.
Properties
| Name | Meaning |
|---|---|
| Name | The name of the dataset to create. This is a required string property. |
| Additional Fields | A collection of optional fields to further configure the dataset: |
| - Description | A textual description of the dataset. |
| - Embedding Model | The embedding model to use for the dataset (string). |
| - Embedding Model Provider | The provider of the embedding model (string). |
| - Indexing Technique | The indexing technique to use. Options are: • High Quality • Economy |
| - Permission | Dataset access permission. Options are: • Only Me • All Team Members |
| - Retrieval Model | A fixed collection of retrieval model settings including: • Reranking Enable (boolean) — whether reranking is enabled • Score Threshold (number) — minimum score threshold • Score Threshold Enabled (boolean) — whether filtering by score threshold is enabled • Search Method (options): Semantic Search, Full Text Search, Hybrid Search • Top K (number) — number of top results to return |
Output
The output of the node is an array of JSON objects representing the created dataset(s). Each output item contains the dataset details as returned from the API after creation, typically including identifiers, names, descriptions, configuration parameters, and metadata related to the dataset.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for authenticating with the Dify AI knowledge base service.
- Requires the base URL of the Dify API endpoint configured in the node credentials.
- The node uses HTTP requests to communicate with the Dify API.
Troubleshooting
Common issues:
- Missing or invalid API key or base URL can cause authentication failures.
- Providing invalid or unsupported values for properties like embedding model or indexing technique may result in API errors.
- Network connectivity issues can prevent successful API calls.
Error messages:
"The operation "create" is not supported for resource "dataset": This indicates a misconfiguration or typo in the operation parameter.- API error responses will be surfaced as node execution errors; check the error message for details such as invalid parameters or permission issues.
Resolutions:
- Verify API credentials and base URL are correctly set.
- Ensure all required fields, especially the dataset name, are provided.
- Use valid options for enumerated fields like indexing technique and permission.
- Check network connectivity and API availability.
Links and References
- Dify AI Knowledge Base Documentation (hypothetical link)
- n8n documentation on Creating Custom Nodes
- General API usage best practices for authentication and error handling