GOPAL Examples

August 28, 2026 ยท View on GitHub

Runnable, copyable examples of evaluating an AI system against a GOPAL policy.

Each example contains:

  • input.json: a sample AI-system payload (the thing being evaluated)
  • run.sh: invokes opa eval against a GOPAL policy with that input
  • expected-output.json: what the verdict should look like
  • README.md: what the example shows and how to adapt it

Prerequisites

You need OPA on your PATH:

curl -L -o opa https://openpolicyagent.org/downloads/latest/opa_linux_amd64 \
  && chmod +x opa && sudo mv opa /usr/local/bin/

Examples

ExampleFrameworkPolicyVerdict
eu-ai-act-transparency/EU AI Actinternational.eu_ai_act.v1.transparencypassing
nist-ai-rmf-govern/NIST AI RMFinternational.nist.v1.governpassing
customer-support-llm/Global content-safetyglobal.v1.toxicitypassing
education-proctoring/Education (FERPA-aligned)industry_specific.education.v1.assessment_and_evaluation.responsible_ai_proctoringpassing

Each run.sh is a one-liner you can copy into CI. To see a non-compliant verdict, edit input.json (e.g., lower a completeness score below 0.7, flip a governance boolean to false) and run again.

Want a new example?

Open an issue with the framework and use case, or send a PR following the layout above. Examples should be:

  • self-contained (no external services)
  • runnable with opa eval only
  • minimal: one policy, one input, one verdict