Skip to main content
Use Kong ai-custom-guardrail (needs AI Proxy) to send prompts and completions to evaluate.
  1. Create an API key on the collector.
  2. Configure AI Proxy (or AI Proxy Advanced) on the route.
  3. Add ai-custom-guardrail pointing at evaluate. Put Kong X-Consumer-ID in consumer_id and a conversation id in session_id.
  4. Block when status == "block".
For output inspection, use direction: output on the response pass (or guarding_mode: BOTH if your Kong version maps both). Transform that rewrites bodies needs more than block / block_message.