Skip to content

docs: use enterprise-safe examples in content moderation pages#792

Merged
RiskeyL merged 3 commits into
mainfrom
fix/remove-inappropriate-language
May 25, 2026
Merged

docs: use enterprise-safe examples in content moderation pages#792
RiskeyL merged 3 commits into
mainfrom
fix/remove-inappropriate-language

Conversation

@RiskeyL
Copy link
Copy Markdown
Contributor

@RiskeyL RiskeyL commented May 25, 2026

Dify's content moderation docs used violent and profane example text, visible on the live "Sensitive Content Moderation" page. Official materials should not contain this kind of language. This PR replaces the flagged examples across every language copy with enterprise-safe equivalents that demonstrate the same moderation behavior, and also neutralizes a politically charged example found during a broader review.

Copilot AI review requested due to automatic review settings May 25, 2026 07:34
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. documentation Improvements or additions to documentation labels May 25, 2026
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 25, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
dify-core-product 🟢 Ready View Preview May 25, 2026, 7:38 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Dify’s content moderation documentation to replace violent/profane (and one politically charged) example text with enterprise-safe examples while preserving the same moderation demonstration behavior across localized copies.

Changes:

  • Replaced violent/profane sample inputs/outputs in Moderation API Extension docs with PII-style examples (SSN/phone, national ID/phone, MyNumber/phone) and corresponding masked outputs.
  • Updated Moderation Tool keyword examples to use non-violent, enterprise-safe keywords and scenarios, including neutralizing a previously political example.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
zh/use-dify/workspace/api-extension/moderation-api-extension.mdx Replaces violent/profane moderation examples with ID/phone examples and masked outputs (ZH).
versions/3-0-x/zh/user-guide/application-orchestrate/app-toolkits/moderation-tool.mdx Updates keyword and moderation-extension examples to enterprise-safe scenarios (ZH, versioned).
versions/3-0-x/en/user-guide/extension/api-based-extension/moderation.mdx Replaces violent/profane moderation examples with SSN/phone examples and masked outputs (EN, versioned).
versions/3-0-x/en/user-guide/application-orchestrate/app-toolkits/moderation-tool.mdx Updates keyword example to use “confidential” instead of violent content (EN, versioned).
ja/use-dify/workspace/api-extension/moderation-api-extension.mdx Replaces violent/profane moderation examples with MyNumber/phone examples and masked outputs (JA).
en/use-dify/workspace/api-extension/moderation-api-extension.mdx Replaces violent/profane moderation examples with SSN/phone examples and masked outputs (EN).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Comments suppressed due to low confidence (1)

versions/3-0-x/zh/user-guide/application-orchestrate/app-toolkits/moderation-tool.mdx:27

  • There’s duplicated punctuation at the end of the sentence ("...usage policy." followed by "。"), which reads as a typo. Drop one of the sentence terminators (either keep the English period inside the quotes or use the Chinese full stop after the quote).
![Moderation Settings](https://assets-docs.dify.ai/dify-enterprise-mintlify/zh_CN/guides/application-orchestrate/app-toolkits/d8b6dff6fce6d70795b87aefc56eb02b.png)

比如我们在自己的本地服务中自定义敏感词审查规则:不能查询有关公司内部薪资的问题。当用户在`query`变量输入"薪资",则在对话时会返回 "Your content violates our usage policy."。

Comment thread en/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread en/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread zh/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread zh/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread ja/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread ja/use-dify/workspace/api-extension/moderation-api-extension.mdx
@RiskeyL RiskeyL force-pushed the fix/remove-inappropriate-language branch from 0dac8b9 to 53e1e8e Compare May 25, 2026 08:22
Copilot AI review requested due to automatic review settings May 25, 2026 08:36
@RiskeyL RiskeyL force-pushed the fix/remove-inappropriate-language branch from 53e1e8e to 42985e6 Compare May 25, 2026 08:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Comment thread en/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread zh/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread ja/use-dify/workspace/api-extension/moderation-api-extension.mdx
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Comment thread en/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread en/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread zh/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread zh/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread ja/use-dify/workspace/api-extension/moderation-api-extension.mdx
Comment thread ja/use-dify/workspace/api-extension/moderation-api-extension.mdx
@RiskeyL RiskeyL merged commit b9058ce into main May 25, 2026
5 checks passed
@RiskeyL RiskeyL deleted the fix/remove-inappropriate-language branch May 25, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants