Skip to main content
After you run all your experiments and get your LLM application live in production, you need to keep monitoring it. Online evaluation checks that the quality is good and that the application is safe for your users in production, and gives you the data to improve it. A monitor you configure alerts you when it detects the condition it checks for, including safety issues, and it generates insights and builds your datasets as it runs, so you keep collecting data for optimizing your AI application.

Real-Time Evaluations for Safety

Just like all web applications need standard safety protections against DDoS attacks, it’s now the default practice to add sane protections to LLM applications too, like PII detection to know when sensitive data is being exposed, or protection against prompt injection, listed as the number 1 vulnerability for LLMs on the OWASP Top 10.

Setting up a Prompt Injection detection monitor

On LangWatch, you set up prompt injection detection, check that it works with your data, and get alerted on the requests it flags. First, go to the Online Evaluations page and click New Online Evaluation:
Choose Online evaluation:
Now, it’s time to choose a dataset so we can test our Prompt Injection detection, if you have some data from production already you can use that, but also just to take better control of the test, let’s create a new dataset and add two sample inputs, one with a normal user message, and the other with a snippet from the DAN Jailbreak:
You can leave the outputs empty, as for the Prompt Injection we are really looking at user input. Go to the next step and select “When a message arrives”:
No need to change the execution settings, press “Next”. Now, choose “Safety” evaluator category, and then “Prompt Injection, Jailbreak Detection”:
Make sure the input from your dataset is correctly mapped to the input of the evaluator, this is what we are going to use for running through the jailbreak detection, you should see a line going from your dataset block into the Prompt Injection Detection block on the right side:
Go to the final step, name the evaluation “Prompt Injection”, and you are ready to run a Trial Evaluation now:
The test is successful: the first row passes as expected, and the second fails because a Prompt Injection attempt was detected. To try more examples, go back to the dataset and add more cases.
Now click “Enable Monitoring”:
LangWatch now monitors your messages for Jailbreak Attempts:
Last modified on August 15, 2026