Setup Guardrails AI with a DatasetEmbeddingsGuard
API Key Setup
Before running your application, ensure you have the following environment variables set:Install
Install the necessary packages for Guardrails AI, the OpenInference instrumentor, Arize OTel, and OpenTelemetry:Setup Tracing
Connect to Arize usingarize.otel.register and apply the GuardrailsInstrumentor.
Run Guardrails Example
Now you can run your Guardrails AI code as usual. The instrumentor will capture relevant trace data.Observe in Arize
After running your Guardrails AI application, traces will be sent to your Arize project. You can log in to Arize to:- Visualize the execution flow of your Guardrails, including the steps and validators.
- Inspect the inputs and outputs of the underlying LLM calls.
- Analyze latency and errors.
- Evaluate the effectiveness of your guards.