From the course: Building Secure and Trustworthy LLMs Using NVIDIA Guardrails

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Debugging and optimizing Guardrails

Debugging and optimizing Guardrails

- [Instructor] Let's take a look at debugging and optimizing guardrails. The goal here is to equip ourselves with the best practices for troubleshooting and refining guardrails, ensuring they operate optimally and reliably. So let's dive right in. First, let's take a look at the tools and techniques we should be using for developing and debugging guardrails. It is recommended to use VS Code with Colang. This setup helps in highlighting VS Code because we can use the Colang highlighting extension. Finally, you can launch a Colang story with nemoguardrails in Python using F5 on your keyboard. This will use the launch.json configuration. To see generated and received events, you can add the --verbose flag when starting nemoguardrails. And for more detailed logging, you can set different debug levels. I recommend setting it to debug as these detailed logs are invaluable for diagnosing issues and understanding the inner workings of guardrails. Next, let's take a look at using log and print…

Contents