Skip to content

Guardrail negative topics or exceptions.

0

Situation: I am creating a guardrail intended for use with students. I am hoping to block / notify for self - harm. The Violence content filter is pretty good, but not great for many use cases. Additionally I want to take a more specific and dramatic reaction to self harm than i do Violence. These concepts are rolled into one. (V.S. OpenAI who has a 'self-harm' category) e.g. these all flag for Violence I want to kill myself I wish I was dead I don't want to live anymore I want to hurt myself

Does not trigger Violence I wish i was dead i wish i could just die

I created a topic filter for self harm with directions - input suggesting contemplating self-harm or suicide, expressions that imply immediate intention to harm themselves. clear signs of distress or endangerment rather than neutral or academic references

Which triggers on all these examples. But as this is an educational guardrail. I do not want it to trigger on "When did kurt cobain commit suicide" - which it does.
the best practices state - Do not define negative topics or exceptions. For example, All contents except medical information or Contents not containing medical information are negative definitions of a topic and must not be used.

so i am not surprised this triggers. But are there any strategies I could use to indicate Self Harm but historical or merely referencing the concept in a neutral or informational manner would NOT.

asked 2 years ago678 views

1 Answer
1

While the best practices for Amazon Bedrock guardrails advise against defining negative topics or exceptions, there are some strategies you can consider to refine your self-harm topic filter for educational use:

  1. Refine the topic definition: Instead of focusing on broad self-harm references, narrow the definition to emphasize immediate, personal intent. For example: "Expressions of personal intent or desire to engage in self-harm or suicide in the present moment."

  2. Use more specific sample phrases: Provide sample phrases that clearly indicate personal intent, such as "I want to hurt myself right now" or "I'm thinking about ending my life today."

  3. Combine with content filters: Use the denied topic in conjunction with the Violence content filter. Set the Violence filter to a lower strength to catch broader references, while using the denied topic for more specific, immediate concerns.

  4. Leverage multiple denied topics: Create separate denied topics for different aspects of self-harm. For instance, one for immediate personal intent and another for general discussion of the topic.

  5. Regular review and refinement: Continuously monitor and adjust your guardrail based on its performance in real-world scenarios.

  6. Consider using word filters: For very specific terms or phrases you want to catch, you might use word filters in addition to denied topics.

Remember that while these strategies can help, they may not perfectly distinguish between all cases. It's important to have human oversight and additional support systems in place, especially when dealing with sensitive topics like self-harm in an educational context.

Lastly, consider reaching out to AWS support for guidance on implementing guardrails for this specific use case, as they may have additional insights or recommendations based on similar customer experiences.
Sources
Block denied topics to help remove harmful content - Amazon Bedrock
Safeguard your app with a guardrail - Amazon Bedrock Studio

answered 2 years ago

EXPERT

reviewed 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.