| @@ -7,10 +7,11 @@ | ||
| 7 | 7 | * - The prompt builder that converts a comment into a chat message array. |
| 8 | 8 | * - Meta read/write helpers so the job callback never touches meta keys |
| 9 | 9 | * directly; the key name lives in one place. |
| 10 | 10 | * |
| 11 | - * Comment analysis is the only auto-analysis the copilot performs (it feeds | |
| 12 | - * the comments-window spam score). Posts, pages, and terms are not analyzed. | |
| 11 | + * Nothing is analyzed automatically. Comment analysis runs on demand only, | |
| 12 | + * through the `desktop-mode/analyze-comment` ability; posts, pages and terms | |
| 13 | + * are not analyzed at all. | |
| 13 | 14 | * |
| 14 | 15 | * Meta key: `_desktop_mode_ai_analysis` (prefixed underscore → hidden from |
| 15 | 16 | * the Custom Fields UI by default). |
| 16 | 17 | * |
| @@ -110,9 +111,9 @@ | ||
| 110 | 111 | $user_text .= "\n\nClassification rules:\n"; |
| 111 | 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"; |
| 112 | 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"; |
| 113 | 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"; |
| 114 | - $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.'; | |
| 115 | 116 | |
| 116 | 117 | /** |
| 117 | 118 | * Filters the user message sent to the provider for comment analysis. |
| 118 | 119 | * |
| @@ -123,9 +124,9 @@ | ||
| 123 | 124 | |
| 124 | 125 | return array( |
| 125 | 126 | array( |
| 126 | 127 | 'role' => 'system', |
| 127 | - '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.', | |
| 128 | 129 | ), |
| 129 | 130 | array( |
| 130 | 131 | 'role' => 'user', |
| 131 | 132 | 'content' => $user_text, |