fix: improve moderation agent prompt and UI layout (#588)

- update prompt to de-emphasize unreliable match scores
- focus analysis on title/artist name matching instead
- remove 200 char truncation on reasoning notes
- make resolution notes use full card width in admin UI

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>

authored by zzstoatzz.io Claude Opus 4.5 and committed by GitHub 83a527d5 5965626e

Changed files
+27 -20
moderation
static
scripts
+4 -3
moderation/static/admin.css
··· 328 328 display: flex; 329 329 flex-direction: column; 330 330 gap: 8px; 331 - align-items: flex-end; 331 + width: 100%; 332 332 } 333 333 334 334 .resolution-reason { 335 335 color: var(--success); 336 336 font-size: 0.85rem; 337 337 font-weight: 500; 338 + text-align: right; 338 339 } 339 340 340 341 .resolution-notes { 341 342 background: var(--bg-primary); 342 343 border: 1px solid var(--border-subtle); 343 344 border-radius: 6px; 344 - padding: 12px; 345 + padding: 12px 14px; 345 346 font-size: 0.8rem; 346 347 color: var(--text-secondary); 347 348 line-height: 1.5; 348 - max-width: 500px; 349 + width: 100%; 349 350 text-align: left; 350 351 } 351 352
+23 -17
scripts/moderation_agent.py
··· 212 212 - LIKELY_FALSE_POSITIVE: high confidence this is NOT infringement (original artist, licensed, etc.) 213 213 - NEEDS_REVIEW: uncertain, requires human judgment 214 214 215 - when analyzing flags, consider: 215 + IMPORTANT: do NOT rely heavily on match scores. the scores from our fingerprinting 216 + system are often unreliable (many show 0.00 even for real matches). instead, focus on: 216 217 217 - 1. ORIGINAL ARTIST indicators (false positive): 218 + 1. TITLE AND ARTIST NAME MATCHING (most important): 219 + - does the matched song title match or closely resemble the uploaded track title? 220 + - does the matched artist name match or resemble the uploader's handle/name? 221 + - are the matched songs well-known commercial tracks? 222 + 223 + 2. ORIGINAL ARTIST indicators (false positive): 218 224 - artist handle matches or is similar to matched artist name 219 - - track title matches the uploaded track title 225 + - track title matches the uploaded track title exactly 220 226 - artist is likely uploading their own distributed music 221 227 222 - 2. FINGERPRINT NOISE indicators (false positive): 223 - - very low match scores (< 0.5) 224 - - generic/common samples or sounds 225 - - matched songs from different genres than uploaded track 226 - - one match among many unrelated matches 228 + 3. FINGERPRINT NOISE indicators (false positive): 229 + - matched songs are from completely different genres 230 + - matched titles have no relation to uploaded track title 231 + - multiple unrelated matches with no common theme 232 + - matched artists are obscure and unrelated to track content 227 233 228 - 3. LICENSED/COVER indicators (false positive): 229 - - track explicitly labeled as cover, remix, or tribute 234 + 4. LICENSED/COVER indicators (false positive): 235 + - track explicitly labeled as cover, remix, or tribute in title 230 236 - common phrases in titles suggesting original content 231 237 232 - 4. LIKELY VIOLATION indicators: 233 - - high match scores (> 0.8) with well-known commercial tracks 234 - - exact title matches with popular songs 238 + 5. LIKELY VIOLATION indicators: 239 + - matched song title is identical or very similar to uploaded track 240 + - matched artist is a well-known commercial artist (e.g., major label) 235 241 - matched artist is clearly different from uploader 236 - - multiple matches to same copyrighted work 242 + - multiple matches to the SAME copyrighted work 237 243 238 244 be conservative: when in doubt, categorize as NEEDS_REVIEW rather than auto-resolving. 239 - provide clear reasoning for each categorization. 245 + provide clear reasoning for each categorization, focusing on name/title analysis. 240 246 241 247 for false positives, suggest the most appropriate resolution reason: 242 248 - original_artist: uploader is the matched artist 243 249 - licensed: uploader has rights to use the content 244 - - fingerprint_noise: audio fingerprinting error 250 + - fingerprint_noise: audio fingerprinting error (unrelated matches) 245 251 - cover_version: legal cover or remix 246 252 - other: doesn't fit other categories 247 253 """ ··· 564 570 else ResolutionReason.OTHER 565 571 ) 566 572 notes = ( 567 - f"AI analysis: {track_analysis.reasoning[:200]}" 573 + f"AI analysis: {track_analysis.reasoning}" 568 574 if track_analysis 569 575 else "AI categorized as false positive" 570 576 )