Guard Results API Endpoint
The results
endpoint screens submitted content according to the policy assigned to the specified project. It then returns the confidence level results of the detectors. It doesn’t make a flagging decision. It can be used to analyze data and calibrate detector threshold levels for policies.
You can use the results
to analyze historic LLM prompt and response data without worrying about triggering alerts or affecting monitoring, as they are not logged as screening requests by Lakera Guard.
If no project ID is passed in the request, then the default Lakera Guard policy is used, which runs all Guard defenses and detectors.
The results can be used to determine the appropriate confidence threshold for a guard
request flagging decision, check custom detectors are working as expected, or for ongoing detector quality monitoring.
It is not recommended to use the results
endpoint in runtime GenAI application security decision, as requests are not logged as screening requests in Lakera Guard and it removes the ability to control your defenses using policies.
API Endpoint
Confidence Levels
Lakera Guard’s detectors provide a confidence level indicating the probability that the analyzed content contains the specific threat type being screened for.
Lakera Guard uses the following confidence levels:
- L1 Confident
- L2 Very likely
- L3 Likely
- L4 Less likely
- L5 Unlikely
These levels are in line with OWASP’s paranoia level definitions for WAFs.
Detectors can be fine-tuned within the policy to set the confidence level threshold for flagging a threat.