chore(ai-moderation): harden LLM prompt and lexical scanner against evasion techniques and cross-lingual vulgarities
This commit is contained in:
@@ -134,6 +134,10 @@ const BADWORD_CATEGORIES: BadwordEntry[] = [
|
|||||||
"kacang",
|
"kacang",
|
||||||
"edan",
|
"edan",
|
||||||
"gila",
|
"gila",
|
||||||
|
"titten",
|
||||||
|
"bitch",
|
||||||
|
"whore",
|
||||||
|
"slut"
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -162,6 +166,8 @@ const BADWORD_CATEGORIES: BadwordEntry[] = [
|
|||||||
"unta",
|
"unta",
|
||||||
"bangke",
|
"bangke",
|
||||||
"bangsat",
|
"bangsat",
|
||||||
|
"kys",
|
||||||
|
"kill yourself"
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -217,6 +223,8 @@ const BADWORD_CATEGORIES: BadwordEntry[] = [
|
|||||||
"dasar cina",
|
"dasar cina",
|
||||||
"dasar tionghoa",
|
"dasar tionghoa",
|
||||||
"dasar pribumi",
|
"dasar pribumi",
|
||||||
|
"nigger",
|
||||||
|
"nigga"
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -391,9 +399,9 @@ export function buildModerationTextEvidence(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (badwordHits.length > 0) {
|
if (badwordHits.length > 0) {
|
||||||
notes.push(`Indonesian badword detected: ${badwordHits.join(", ")}`);
|
notes.push(`Known badword detected: ${badwordHits.join(", ")}`);
|
||||||
} else {
|
} else {
|
||||||
notes.push("no Indonesian badword detected");
|
notes.push("no known badword detected");
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user