Give feedback on samples
When AI Guardrails returns moderation results that don't match your expectations, submit feedback on those samples. If you use the AI Guardrails API on your own platform, you can also call feedback operations to give feedback on samples whose machine-assisted moderation results do not meet your expectations. Alibaba Cloud uses the feedback data to retrain the model and correct results in future versions, making the model more adaptive to your business scenarios.
AI Guardrails supports feedback on the following sample types:
For API details, see the API reference linked above for each sample type.
How feedback works
Feedback triggers two separate improvement paths, each with different timing and scope:
Path | Mechanism | Takes effect | Applies to |
Async model training | Feedback data is added to model training. The retrained model corrects results in later versions. | After model retraining (not immediate) | Image, video, and text samples |
Real-time image library | Images are automatically added to a custom image library (whitelist or blacklist). AI Guardrails applies the library immediately for subsequent requests. | Immediately | Image samples only |
For image samples, use both paths together: submit feedback to improve the model over time, and use the image library to correct results in real time.
Add image samples to a custom image library automatically
For image sample feedback, set the label parameter when calling feedback operations to add images to a custom image library automatically:
| Effect |
| Adds the image to the whitelist |
| Adds the image to the blacklist |
Use values that reflect the actual risk type — for example, porn for explicit content or terrorism for violent extremism.
Model training requires enough samples and takes time to complete. Use the image library path for immediate corrections while waiting for the retrained model to take effect.
Manage feedback-based image libraries
After submitting image feedback with a label value, you can manage the resulting feedback-based image libraries in the Alibaba Cloud AI Guardrails console. The management operations are the same as those for user-created image libraries, with one exception: you cannot create or delete a feedback-based image library.
For management instructions, see Manage custom image libraries.