Actions30
- Dataset Actions
- Document Actions
- Segment Actions
- Metadata Actions
Segment → Create Child
AI-generatedOverview
The node manages segments within a knowledge base dataset, specifically allowing the creation of child segments under an existing segment. This is useful for hierarchical organization of content in AI knowledge bases, where segments represent pieces of information or Q&A pairs. For example, you might create a child segment to add a subtopic or detailed explanation related to a parent segment, enabling structured and granular knowledge representation.
Properties
| Name | Meaning |
|---|---|
| Dataset ID | The unique identifier of the dataset containing the segment. |
| Segment ID | The unique identifier of the parent segment under which the child segment will be created. |
| Content | The textual content of the new child segment. |
| Additional Fields | Optional extra fields for the child segment: - Content (alternative content field) - Answer (text answer for Q&A format) - Keywords (comma-separated keywords) |
Output
The node outputs JSON data representing the newly created child segment. This typically includes details such as the segment's ID, content, metadata, and its relationship to the parent segment. The output does not include binary data.
Dependencies
- Requires an API key credential for authenticating with the external Dify AI knowledge base service.
- The node uses the base URL and authorization token from the configured credentials.
- No other external dependencies are required.
Troubleshooting
Common issues:
- Invalid or missing Dataset ID or Segment ID will cause errors because the parent context is necessary.
- Insufficient permissions or invalid API key can lead to authentication failures.
- Providing empty or malformed content may result in rejection by the API.
Error messages:
"The operation "createChild" is not supported for resource "segment": Indicates a misconfiguration or unsupported operation; verify the selected operation.- API errors related to authorization or resource not found usually indicate incorrect credentials or IDs.
Resolution tips:
- Double-check that Dataset ID and Segment ID are correct and exist.
- Ensure the API key credential is valid and has appropriate access rights.
- Validate the content input before execution.
Links and References
- Dify AI Knowledge Base Documentation (general reference for API and concepts)
- n8n documentation on creating custom nodes