From d4a83eefe8d66cb73e883c25409aeb5e8fcc0e6a Mon Sep 17 00:00:00 2001 From: Lilith Date: Thu, 26 Feb 2026 22:30:51 -0800 Subject: [PATCH] =?UTF-8?q?feat(knowledge-verification):=20=E2=9C=A8=20Imp?= =?UTF-8?q?lement=20knowledge=20verification=20service=20integration=20wit?= =?UTF-8?q?h=20truth=20validation=20APIs=20and=20define=20semantic=20rules?= =?UTF-8?q?=20in=20YAML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- ...wledge-verification-integration.service.ts | 4 ++-- .../semantic-service/src/truth-rules.yaml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/features/content-moderation/backend-api/src/knowledge-verification-integration.service.ts b/features/content-moderation/backend-api/src/knowledge-verification-integration.service.ts index 35f377126..17830e439 100755 --- a/features/content-moderation/backend-api/src/knowledge-verification-integration.service.ts +++ b/features/content-moderation/backend-api/src/knowledge-verification-integration.service.ts @@ -193,9 +193,9 @@ export class KnowledgeVerificationIntegrationService { private getRulesForContentType(contentType: string): string[] { switch (contentType) { case 'bio': - return ['economics', 'competitors', 'terminology']; + return ['economics', 'competitors', 'terminology', 'slang']; case 'listing': - return ['economics', 'terminology']; + return ['economics', 'terminology', 'slang']; case 'message': return ['terminology']; case 'review': diff --git a/features/truth-validation/semantic-service/src/truth-rules.yaml b/features/truth-validation/semantic-service/src/truth-rules.yaml index 17c4f0dfb..6b7b5482c 100644 --- a/features/truth-validation/semantic-service/src/truth-rules.yaml +++ b/features/truth-validation/semantic-service/src/truth-rules.yaml @@ -28,3 +28,22 @@ corrections: - "Comparative tables showing multiple platforms side-by-side are informational, not contradictions" - "Use respectful terminology: 'sex worker' not derogatory terms, 'client' not 'john'" - "If no retrieved context is relevant, the paragraph cannot be validated — skip it" + + # Slang and cultural context rules (detection enrichment, not correction) + slang: + - pattern: "\\b(roses|GFE|PSE|BBW|BBBJ|DATY|MSOG)\\b" + flags: gi + replacement: null + reason: "SW industry vocabulary — detect for analytics, never correct" + - pattern: "\\b(incall|outcall|duos|provider|companion|hobbyist|p4p|donation)\\b" + flags: gi + replacement: null + reason: "SW business terminology — normal platform language" + + # Slang LLM evaluation guidance + slang_system_prompt_rules: + - "SW industry vocabulary (roses, GFE, PSE, BBW, incall, outcall) is NORMAL platform language — detect for analytics, never correct or flag" + - "Payment terminology (donation, tribute, roses) is standard business vocabulary on this platform" + - "Coded language detection is for AWARENESS and ANALYTICS — not censorship" + - "Provider safety terms (trafficking signals, doxxing patterns) should be flagged at appropriate severity" + - "LE awareness language should be detected for provider safety — never blocked (legal gray area)"