674. Jigsaw - Agile Community Rules Classification | jigsaw-agile-community-rules
所有流程均在 Kaggle Notebook 测试运行期间执行。
RULE_SPECIFIC_INSTRUCTIONS = {
"No financial advice": {
"violation": "Rewrite this financial advice comment using different words while keeping its advisory nature about investments, taxes, or crypto.",
"compliant": "Rewrite this comment using different words while keeping it free from specific financial advice.",
},
"No medical advice": {
"violation": "Rewrite this medical advice comment using different words while keeping its diagnostic or treatment recommendation nature.",
"compliant": "Rewrite this comment using different words while keeping it free from specific medical advice.",
},
"No promotion of illegal activity": {
"violation": "Rewrite this comment using different words while keeping its promotion or encouragement of illegal activities.",
"compliant": "Rewrite this comment using different words while keeping it legal and compliant.",
},
"No spoilers": {
"violation": "Rewrite this spoiler comment using different words while keeping the reveal of important plot details.",
"compliant": "Rewrite this comment using different words while keeping it spoiler-free.",
},
"No Advertising": {
"violation": "Rewrite this promotional or advertising text using different words while keeping its spammy, promotional nature with links or product promotion.",
"compliant": "Rewrite this comment using different words while keeping it free from advertising or promotional content.",
},
"No legal advice": {
"violation": "Rewrite this legal advice comment using different words while keeping its advisory nature about legal matters.",
"compliant": "Rewrite this comment using different words while keeping it free from specific legal advice.",
},
"Default": {
"violation": "Rewrite this rule-violating comment using different words while preserving its problematic nature and rule violation.",
"compliant": "Rewrite this compliant comment using different words while keeping it appropriate and rule-compliant.",
},
}
body 和 rule 作为输入,并根据 rule_violation 输出 Yes 或 No。