Skip to content

Architecture

Using Prompt Analyzer

To ensure the safety of your generative inputs and outputs, implement a call to Prompt Analyzer when a prompt is received. If the verdict is false, pass the prompt to your application.

When the application returns its output, call Prompt Analyzer again to check whether the model output is safe to pass to the original requester.

Prompt Analyzer Bad Prompt versus Happy Path

Additional details:

  • Prompt Analyzer is designed to take one message per call, not a collection of messages.
  • Prompt Analyzer can take just input, just output, or both. To gate content separately, make separate calls.