Layerup Security employs a custom algorithm to detect and prevent abuse at multiple levels using this guardrail.
abuse_config
object allows you to specify an abuse configuration to detect abuse across the project. The configuration can be set at four different levels:
project_rpm
): Sets a threshold for all requests to the project. If the RPM exceeds this threshold, the LLM call will be marked as unsafe.customer_rpm
): Sets a threshold for all requests made by a customer for the project. If the customer’s RPM exceeds this threshold, the LLM call will be marked as unsafe.scope_rpm
): Sets a threshold for all requests made within a scope for the project. If the scope’s RPM exceeds this threshold, the LLM call will be marked as unsafe, regardless of the customer.customer_scope_rpm
): Sets a threshold for requests made by a customer within a given scope for the project. If the customer’s RPM for the scope exceeds this threshold, the LLM call will be marked as unsafe.layerup.abuse
guardrail with the appropriate abuse_config
metadata.