| @@ -111,9 +111,9 @@ | ||
| 111 | 111 | $user_text .= "\n\nClassification rules:\n"; |
| 112 | 112 | $user_text .= "- `harmful = true`: the comment is hostile, insulting, or demeaning — e.g. attacks on the author's competence, aggressive rhetoric, threats, hate speech. Tone matters: an angry rant calling the article \"garbage\" is harmful even without explicit language.\n"; |
| 113 | 113 | $user_text .= "- `spam = true`: the comment is promotional or off-topic — e.g. commercial links, ALL CAPS sales copy, \"CLICK HERE\" / \"BOOK NOW\", generic praise unrelated to the post.\n"; |
| 114 | 114 | $user_text .= "- These are INDEPENDENT flags. A hostile but on-topic comment is harmful=true, spam=false. A promotional but politely worded comment is spam=true, harmful=false. Both can be true simultaneously.\n"; |
| 115 | - $user_text .= '- The `topic` and `ai_summary` fields MUST capture the tone and sentiment so that search queries like "negative comment", "angry reader", or "spam" return the correct results.'; | |
| 115 | + $user_text .= '- The `topic` and `ai_summary` fields capture the tone and sentiment so that search queries like "negative comment", "angry reader", or "spam" return the correct results.'; | |
| 116 | 116 | |
| 117 | 117 | /** |
| 118 | 118 | * Filters the user message sent to the provider for comment analysis. |
| 119 | 119 | * |
| @@ -124,9 +124,9 @@ | ||
| 124 | 124 | |
| 125 | 125 | return array( |
| 126 | 126 | array( |
| 127 | 127 | 'role' => 'system', |
| 128 | - 'content' => 'You are a content moderation assistant for a WordPress site. Your analysis is used by a semantic search engine, so the topic label and summary must reflect the comment\'s TONE and SENTIMENT — not just its subject matter. An angry, insulting comment must be described as angry and insulting. A promotional spam comment must be described as promotional spam. A warm congratulatory message must be described as warm and positive. Accurate tone labelling is critical for search to work.', | |
| 128 | + 'content' => 'You are a content moderation assistant for a WordPress site. A semantic search engine matches site owners\' queries against your topic label and summary, so describe the comment\'s tone and sentiment as well as its subject: an insulting comment reads as insulting, promotional spam as promotional spam, a congratulatory note as warm and positive.', | |
| 129 | 129 | ), |
| 130 | 130 | array( |
| 131 | 131 | 'role' => 'user', |
| 132 | 132 | 'content' => $user_text, |