fix(ai-moderation): implement prompt analysis recommendations
- Expand IMPHNEN domain rule to cover wildcard (*.imphnen.*) - Trim redundant SARA examples from TEXT_ONLY_MODE (save ~950 tokens) - Add debugging logs for channel culture injection into prompt - Sync flag validation set with missing flags: potential_evasion, unclear_context Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -756,6 +756,11 @@ async function runTextOnlyBatch(
|
||||
? channelCultureObj.culture_summary
|
||||
: undefined;
|
||||
|
||||
// Log channel culture & user profiles for debugging
|
||||
if (channelCulture) {
|
||||
log.debug({ channelId, culturePreview: channelCulture.slice(0, 120) }, "Injected channel culture into prompt");
|
||||
}
|
||||
|
||||
// Run sub-batches sequentially to avoid rate limits
|
||||
for (let i = 0; i < subBatches.length; i++) {
|
||||
const batch = subBatches[i];
|
||||
@@ -1092,6 +1097,11 @@ async function runMediaBatch(
|
||||
? channelCultureObj.culture_summary
|
||||
: undefined;
|
||||
|
||||
// Log channel culture for debugging
|
||||
if (channelCulture) {
|
||||
log.debug({ channelId, culturePreview: channelCulture.slice(0, 120) }, "Injected channel culture into prompt (media path)");
|
||||
}
|
||||
|
||||
const correctedExamples = await buildCorrectedFewShotExamples();
|
||||
const systemText = buildSystemPromptModular({
|
||||
contextText,
|
||||
|
||||
Reference in New Issue
Block a user