Customizing textual content content material moderation with Amazon Nova
Contemplate a rising social media platform that processes hundreds of thousands of consumer posts every day. Their content material moderation crew faces a well-recognized problem: their rule-based system flags a cooking video discussing “knife methods” as violent content material, irritating customers, whereas concurrently lacking a veiled menace disguised as a restaurant evaluation. Once they attempt a general-purpose AI moderation service, it struggles with their group’s gaming terminology, flagging discussions about “eliminating opponents” in technique video games whereas lacking precise harassment that makes use of coded language particular to their platform. The moderation crew finds themselves caught between consumer complaints about over-moderation and advertiser considerations about dangerous content material slipping by—an issue that scales exponentially as their consumer base grows.
This situation illustrates the broader challenges that content material moderation at scale presents for patrons throughout industries. Conventional rule-based approaches and key phrase filters typically battle to catch nuanced coverage violations, rising dangerous content material patterns, or contextual violations that require deeper semantic understanding. In the meantime, the amount of user-generated content material continues to develop, making guide moderation more and more impractical and expensive. Clients want adaptable options that may scale with their content material wants whereas sustaining accuracy and reflecting their particular moderation insurance policies.
Whereas general-purpose AI content material moderation providers supply broad capabilities, they sometimes implement standardized insurance policies which may not align with a buyer’s distinctive necessities. These approaches typically battle with domain-specific terminology, advanced coverage edge instances, or culturally-specific content material analysis. Moreover, totally different prospects might need various taxonomies for content material annotation and totally different thresholds or boundaries for a similar coverage classes. Consequently, many purchasers discover themselves managing trade-offs between detection capabilities and false positives.
On this submit, we introduce an strategy to content material moderation by Amazon Nova customization on Amazon SageMaker AI. With this resolution, you may fine-tune Amazon Nova for content material moderation duties tailor-made to your necessities. Through the use of domain-specific coaching knowledge and organization-specific moderation pointers, this custom-made strategy can ship improved accuracy and coverage alignment in comparison with off-the-shelf options. Our analysis throughout three benchmarks exhibits that custom-made Nova fashions obtain a mean enchancment of seven.3% in F1 scores in comparison with the baseline Nova Lite, with particular person enhancements starting from 4.2% to 9.2% throughout totally different content material moderation duties. The custom-made Nova mannequin can detect coverage violations, perceive contextual nuances, and adapt to content material patterns based mostly by yourself dataset.
Key benefits
With Nova customization, you may construct textual content content material moderators that ship compelling benefits over various approaches together with coaching from scratch and utilizing a normal basis mannequin. Through the use of pre-trained Nova fashions as a basis, you may obtain superior outcomes whereas decreasing complexity, value, and time-to-deployment.
When in comparison with constructing fashions completely from the bottom up, Nova customization gives a number of key advantages on your group:
- Makes use of pre-existing information: Nova comes with prior information in textual content content material moderation, having been educated on comparable datasets, offering a basis for personalisation that achieves aggressive efficiency with simply 10,000 situations for SFT.
- Simplified workflow: As an alternative of constructing coaching infrastructure from scratch, you may add formatted knowledge and submit a SageMaker coaching job, with coaching code and workflows offered, finishing coaching in roughly one hour at a price of $55 (based mostly on US East Ohio Amazon EC2 P5 occasion pricing).
- Lowered time and price: Reduces the necessity for in depth computational sources and months of coaching time required for constructing fashions from the bottom up.
Whereas general-purpose basis fashions supply broad capabilities, Nova customization delivers extra focused advantages on your content material moderation use instances:
- Coverage-specific customization: In contrast to basis fashions educated with broad datasets, Nova customization fine-tunes to your group’s particular moderation pointers and edge instances, attaining 4.2% to 9.2% enhancements in F1 scores throughout totally different content material moderation duties.
- Constant efficiency: Reduces unpredictability from third-party API updates and coverage modifications that may alter your content material moderation habits.
- Price effectivity: At $0.06 per 1 million enter tokens and $0.24 per 1 million output tokens, Nova Lite gives important value benefits in comparison with different industrial basis fashions that spend about 10–100 occasions extra value, delivering substantial value financial savings.
Past particular comparisons, Nova customization provides inherent advantages that apply no matter your present strategy:
- Versatile coverage boundaries: Customized thresholds and coverage boundaries may be managed by prompts and taught to the mannequin throughout fine-tuning.
- Accommodates numerous taxonomies: The answer adapts to totally different annotation taxonomies and organizational content material moderation frameworks.
- Versatile knowledge necessities: You should utilize your current coaching datasets with proprietary knowledge or use public coaching splits from established content material moderation benchmarks if you happen to don’t have your personal datasets.
Demonstrating content material moderation efficiency with Nova customization
To guage the effectiveness of Nova customization for content material moderation, we developed and evaluated three content material moderation fashions utilizing Amazon Nova Lite as our basis. Our strategy used each proprietary inner content material moderation datasets and established public benchmarks, coaching low-rank adaptation (LoRA) fashions with 10,000 fine-tuning situations—augmenting Nova Lite’s in depth base information with specialised content material moderation experience.
Coaching strategy and mannequin variants
We created three mannequin variants from Nova Lite, every optimized for various content material moderation situations that you just may encounter in your personal implementation:
- NovaTextCM: Skilled on our inner content material moderation dataset, optimized for organization-specific coverage enforcement
- NovaAegis: Wonderful-tuned utilizing Aegis-AI-Content material-Security-2.0 coaching break up, specialised for adversarial immediate detection
- NovaWildguard: Personalized with WildGuardMix coaching break up, designed for content material moderation throughout actual and artificial contents
This multi-variant strategy demonstrates the flexibleness of Nova customization in adapting to totally different content material moderation taxonomies and coverage frameworks you can apply to your particular use instances.
Complete benchmark analysis
We evaluated our custom-made fashions in opposition to three established content material moderation benchmarks, every representing totally different facets of the content material moderation challenges that you just may encounter in your personal deployments. In our analysis, we computed F1 scores for binary classification, figuring out whether or not every occasion violates the given coverage or not. The F1 rating gives a balanced measure of precision and recall, which is helpful for content material moderation the place each false positives (incorrectly flagging secure content material) and false negatives (lacking dangerous content material) carry prices.
- Aegis-AI-Content material-Security-2.0 (2024): A dataset with 2,777 check samples (1,324 secure, 1,453 unsafe) for binary coverage violation classification. This dataset combines artificial LLM-generated and actual prompts from crimson teaming datasets, that includes adversarial prompts designed to check mannequin robustness in opposition to bypass makes an attempt. Obtainable at Aegis-AI-Content-Safety-Dataset-2.0.
- WildGuardMix (2024): An analysis set with 3,408 check samples (2,370 secure, 1,038 unsafe) for binary coverage violation classification. The dataset consists principally of actual prompts with some LLM-generated responses, curated from a number of security datasets and human-labeled for analysis protection. Obtainable at wildguardmix.
- Jigsaw Poisonous Remark (2018): A benchmark with 63,978 check samples (57,888 secure, 6,090 unsafe) for binary poisonous content material classification. This dataset comprises actual Wikipedia speak web page feedback and serves as a longtime benchmark within the content material moderation group, offering insights into mannequin efficiency on genuine user-generated content material. Obtainable at jigsaw-toxic-comment.
Efficiency achievements
Our outcomes present that Nova customization gives significant efficiency enhancements throughout all benchmarks you can anticipate when implementing this resolution. The custom-made fashions achieved efficiency ranges corresponding to giant industrial language fashions (referred to right here as LLM-A and LLM-B) whereas utilizing solely a fraction of the coaching knowledge and computational sources.
The efficiency knowledge exhibits important F1 rating enhancements throughout all mannequin variants. NovaLite baseline achieved F1 scores of 0.7822 on Aegis, 0.54103 on Jigsaw, and 0.78901 on Wildguard. NovaTextCM improved to 0.8305 (+6.2%) on Aegis, 0.59098 (+9.2%) on Jigsaw, and 0.83871 (+6.3%) on Wildguard. NovaAegis achieved the very best Aegis efficiency at 0.85262 (+9.0%), with scores of 0.55129 on Jigsaw, and 0.81701 on Wildguard. NovaWildguard scored 0.848 on Aegis, 0.56439 on Jigsaw, and 0.82234 (+4.2%) on Wildguard.

As proven within the previous determine, the efficiency beneficial properties have been noticed throughout all three variants, with every mannequin displaying enhancements over the baseline Nova Lite throughout a number of analysis standards:
- NovaAegis achieved the very best efficiency on the Aegis benchmark (0.85262), representing a 9.0% enchancment over Nova Lite (0.7822)
- NovaTextCM confirmed constant enhancements throughout all benchmarks: Aegis (0.8305, +6.2%), Jigsaw (0.59098, +9.2%), and WildGuard (0.83871, +6.3%)
- NovaWildguard carried out properly on JigSaw (0.56439, +2.3%) and WildGuard (0.82234, +4.2%)
- All three custom-made fashions confirmed beneficial properties throughout benchmarks in comparison with the baseline Nova Lite
These efficiency enhancements counsel that Nova customization can facilitate significant beneficial properties in content material moderation duties by focused fine-tuning. The constant enhancements throughout totally different benchmarks point out that custom-made Nova fashions have the potential to exceed the efficiency of business fashions in specialised purposes.
Price-effective large-scale deployment
Past efficiency enhancements, Nova Lite provides important value benefits for large-scale content material moderation deployments you can benefit from on your group. With low-cost pricing for each enter and output tokens, Nova Lite gives substantial value benefits in comparison with industrial basis fashions, delivering value financial savings whereas sustaining aggressive efficiency.

The price-performance evaluation on the WildGuard benchmark reveals compelling benefits for Nova customization you can notice in your deployments. Your Nova variants obtain superior F1 scores in comparison with industrial basis fashions whereas working within the low-cost class. For instance, NovaTextCM achieves an F1 rating of 0.83871 on WildGuard whereas working at extraordinarily low value, outperforming LLM-B’s F1 rating of 0.80911 which operates at high-cost pricing—delivering higher efficiency at considerably decrease value.
This value effectivity turns into notably compelling at scale on your group. Whenever you’re moderating giant volumes of content material every day, the pricing benefit of Nova variants within the low-cost class can translate to substantial operational financial savings whereas delivering superior efficiency. The mix of higher accuracy and dramatically decrease prices makes Nova customization an economically engaging resolution on your enterprise content material moderation wants.
Key coaching insights
We noticed a number of necessary findings for Nova customization that may information your implementation strategy as follows.
- Extra knowledge isn’t essentially higher: We discovered that 10,000 coaching situations represents an appropriate quantity for LoRA adaptation. After we elevated the coaching knowledge from 10,000 to twenty-eight,000 situations, we noticed proof of overfitting. This discovering means that when utilizing LoRA for fine-tuning, further coaching situations can harm efficiency, indicating that the pre-existing content material moderation information in-built to Nova permits for studying with comparatively small, well-curated datasets.
- Format consistency is necessary: Efficiency degraded when coaching and analysis knowledge codecs have been inconsistent. This highlights the significance of sustaining constant knowledge formatting all through the customization pipeline.
- Process-specific adaptation: Every mannequin variant carried out finest on benchmarks most much like their coaching knowledge, confirming that focused customization can ship improved outcomes in comparison with general-purpose approaches.
Methods to prepare a mannequin with Nova customization
This part gives a walkthrough for coaching your personal custom-made Nova mannequin for content material moderation. We’ll cowl the info preparation, configuration setup, and coaching execution utilizing SageMaker AI.
Conditions and setup
Earlier than starting the coaching course of, guarantee you’ve got adopted the excellent directions in Fine-tuning Amazon Nova models using SageMaker training jobs. The next examples show the particular configurations we used for our textual content content material moderation fashions.
Coaching knowledge format
Your coaching knowledge have to be formatted as a JSONL file and uploaded to an Amazon Simple Storage Service (Amazon S3) bucket. Every line ought to comprise an entire dialog following the Amazon Bedrock conversation schema. Right here’s an instance from our coaching dataset:
This format helps be sure that the mannequin learns each the enter construction (content material moderation directions and textual content to guage) and the anticipated output format (structured coverage violation responses).
Coaching configuration
The coaching recipe defines all of the hyperparameters and settings on your Nova customization. Save the next configuration as a YAML file (for instance, text_cm.yaml):
This configuration makes use of LoRA for environment friendly fine-tuning, which considerably reduces coaching time and computational necessities whereas sustaining excessive efficiency.
SageMaker AI coaching job setup
Use the next pocket book code to submit your coaching job to SageMaker AI. This implementation carefully follows the pattern pocket book offered within the official pointers, with particular diversifications for content material moderation:
Necessary configuration notes:
Coaching efficiency
With our configuration utilizing LoRA fine-tuning, coaching 10,000 situations on Nova Lite takes roughly one hour utilizing the previous setup. This environment friendly coaching time demonstrates the ability of parameter-efficient fine-tuning mixed with Nova’s pre-existing information base.The comparatively brief coaching period makes it sensible to iterate in your content material moderation insurance policies and retrain fashions as wanted, enabling fast adaptation to evolving content material challenges.
Methods to infer with a custom-made Nova mannequin
After your Nova mannequin has been efficiently educated for content material moderation, this part guides you thru the analysis and inference course of. We’ll show benchmark your custom-made mannequin in opposition to established datasets and deploy it for manufacturing use.
Conditions and setup
Earlier than continuing with mannequin analysis, guarantee you’ve got adopted the excellent directions in Evaluating your SageMaker AI-trained model. The next examples present the particular configurations we used for benchmarking our content material moderation fashions in opposition to public datasets.
Take a look at knowledge format
Your analysis knowledge must be formatted as a JSONL file and uploaded to an S3 bucket. Every line comprises a query-response pair that represents the enter immediate and anticipated output for analysis. Right here’s an instance from our check dataset:
This format permits the analysis framework to check your mannequin’s generated responses in opposition to the anticipated floor reality labels, enabling correct efficiency measurement throughout totally different content material moderation benchmarks. Observe that the response discipline was not used within the inference however included right here to ship the label within the inference output.
Analysis configuration
The analysis recipe defines the inference parameters and analysis settings on your custom-made Nova mannequin. Save the next configuration as a YAML file (for instance, recipe.yaml):
Key configuration notes:
- The
temperature: 0setting ensures deterministic outputs, which is essential for benchmarking
SageMaker analysis job setup
Use the next pocket book code to submit your analysis job to SageMaker. You should utilize this setup to benchmark your custom-made mannequin in opposition to the identical datasets utilized in our efficiency analysis:
Necessary setup notes:
Clear up
To keep away from incurring further prices after following together with this submit, it’s best to clear up the AWS sources that have been created throughout the coaching and deployment course of. Right here’s how one can systematically take away these sources:
Cease and delete coaching jobs
After your coaching job finishes, you may clear up your coaching job utilizing the next AWS Command Line Interface (AWS CLI) command.
aws sagemaker list-training-jobsaws sagemaker stop-training-job --training-job-name <identify> # provided that nonetheless working
Delete endpoints, endpoint configs, fashions
These are the large value drivers if left working. You need to delete them on this particular order:aws sagemaker delete-endpoint --endpoint-name <endpoint-name>
aws sagemaker delete-endpoint-config --endpoint-config-name <endpoint-config-name>
aws sagemaker delete-model --model-name <model-name>
Delete in that order:
- endpoint
- config
- mannequin.
Clear up storage and artifacts
Coaching output and checkpoints are saved in Amazon S3. Delete them if not wanted:
aws s3 rm s3://your-bucket-name/path/ --recursive
Extra storage concerns on your cleanup:
- FSx for Lustre (if you happen to hooked up it for coaching or HyperPod): delete the file system within the FSx console
- EBS volumes (if you happen to spun up notebooks or clusters with hooked up volumes): test to substantiate that they aren’t lingering
Take away supporting sources
For those who constructed customized Docker photos for coaching or inference, delete them:
aws ecr delete-repository --repository-name <identify> --force
Different supporting sources to contemplate:
- CloudWatch logs: These don’t often value a lot, however you may clear them if desired
- IAM roles: For those who created non permanent roles for jobs, detach or delete insurance policies if unused
For those who used HyperPod
For HyperPod deployments, you also needs to:
- Delete the HyperPod cluster (to the SageMaker console and select HyperPod)
- Take away related VPC endpoints, safety teams, and subnets if devoted
- Delete coaching job sources tied to HyperPod (identical because the earlier: endpoints, configs, fashions, FSx, and so forth)
Analysis efficiency and outcomes
With this analysis setup, processing 100,000 check situations utilizing the educated Nova Lite mannequin takes roughly one hour utilizing a single p5.48xlarge occasion. This environment friendly inference time makes it sensible to commonly consider your mannequin’s efficiency as you iterate on coaching knowledge or modify moderation insurance policies.
Subsequent steps: Deploying your custom-made Nova mannequin
Able to deploy your custom-made Nova mannequin for manufacturing content material moderation? Right here’s deploy your mannequin utilizing Amazon Bedrock for on-demand inference:
Customized mannequin deployment workflow
After you’ve educated or fine-tuned your Nova mannequin by SageMaker utilizing PEFT and LoRA methods as demonstrated on this submit, you may deploy it in Amazon Bedrock for inference. The deployment course of follows this workflow:
- Create your custom-made mannequin: Full the Nova customization coaching course of utilizing SageMaker together with your content material moderation dataset
- Deploy utilizing Bedrock: Arrange a customized mannequin deployment in Amazon Bedrock
- Use for inference: Use the deployment Amazon Useful resource Title (ARN) because the mannequin ID for inference by the console, APIs, or SDKs
On-demand inference necessities
For on-demand (OD) inference deployment, guarantee your setup meets these necessities:
- Coaching methodology: For those who used SageMaker customization, on-demand inference is barely supported for Parameter-Environment friendly Wonderful-Tuned (PEFT) fashions, together with Direct Choice Optimization, when hosted in Amazon Bedrock.
- Deployment platform: Your custom-made mannequin have to be hosted in Amazon Bedrock to make use of on-demand inference capabilities.
Implementation concerns
When deploying your custom-made Nova mannequin for content material moderation, think about these elements:
- Scaling technique: Use the managed infrastructure of Amazon Bedrock to routinely scale your content material moderation capability based mostly on demand.
- Price optimization: Reap the benefits of on-demand pricing to pay just for the inference requests you make, optimizing prices for variable content material moderation workloads.
- Integration strategy: Use the deployment ARN to combine your custom-made mannequin into current content material moderation workflows and purposes.
Conclusion
The quick inference pace of Nova Lite—processing 100,000 situations per hour utilizing a single P5 occasion—gives important benefits for large-scale content material moderation deployments. With this throughput, you may average excessive volumes of user-generated content material in real-time, making Nova customization notably well-suited for platforms with hundreds of thousands of every day posts, feedback, or messages that require quick coverage enforcement.
With the deployment strategy and subsequent steps described on this submit, you may seamlessly combine your custom-made Nova mannequin into manufacturing content material moderation programs, benefiting from each the efficiency enhancements demonstrated in our analysis and the managed infrastructure of Amazon Bedrock for dependable, scalable inference.
Concerning the authors
Yooju Shin is an Utilized Scientist on Amazon’s AGI Foundations RAI crew. He focuses on auto-prompting for RAI coaching dataset and supervised fine-tuning (SFT) of multimodal fashions. He accomplished his Ph.D. from KAIST in 2023.
Chentao Ye is a Senior Utilized Scientist within the Amazon AGI Foundations RAI crew, the place he leads key initiatives in post-training recipes and multimodal giant language fashions. His work focuses notably on RAI alignment. He brings deep experience in Generative AI, Multimodal AI, and Accountable AI.
Fan Yang is a Senior Utilized Scientist on the Amazon AGI Foundations RAI crew, the place he develops multimodal observers for accountable AI programs. He obtained a PhD in Laptop Science from the College of Houston in 2020 with analysis targeted on false data detection. Since becoming a member of Amazon, he has specialised in constructing and advancing multimodal fashions.
Weitong Ruan is an Utilized Science Manger on the Amazon AGI Foundations RAI crew, the place he leads the event of RAI programs for Nova and bettering Nova’s RAI efficiency throughout SFT. Earlier than becoming a member of Amazon, he accomplished his Ph.D. in Electrical Engineering with specialization in Machine Studying from the Tufts College in Aug 2018.
Rahul Gupta is a senior science supervisor on the Amazon Synthetic Normal Intelligence crew heading initiatives on Accountable AI. Since becoming a member of Amazon, he has targeted on designing NLU fashions for scalability and pace. A few of his newer analysis focuses on Accountable AI with emphasis on privateness preserving methods, equity and federated studying. He obtained his PhD from the College of Southern California in 2016 on decoding non-verbal communications in human interplay. He has printed a number of papers in avenues akin to EMNLP, ACL, NAACL, ACM Facct, IEEE-Transactions of affective computing, IEEE-Spoken language Understanding workshop, ICASSP, Interspeech and Elselvier pc speech and language journal. He’s additionally co-inventor on over twenty 5 patented/patent-pending applied sciences at Amazon.