Skip to content
LakeSharkDocumentation
GOVERNANCESETS / DOCUMENTATION

GovernanceSets

Reusable server-enforced policy for AnswerSets.

GovernanceSets are reusable server-enforced policy objects managed from the Governance surface. Use the LakeShark console or the hosted Answers API to configure policies and AnswerSet assignments.

They are separate from:

  • AnswerSet instructions
  • Knowledge
  • output policy
  • provider credentials

An AnswerSet can use zero, one, or multiple GovernanceSets.

What GovernanceSets control

GovernanceSets can enforce:

  • PII handling
  • prompt-injection handling
  • prohibited-content handling
  • blocked terms
  • priority-ordered custom input/output rules with block, redact, and audit actions
  • maximum provider calls
  • input-token ceilings
  • output-token ceilings

Controls are enforced server-side on AnswerSet traffic.

How they are used

GovernanceSet library
        ↓
select one or more
        ↓
AnswerSet
        ↓
LakeShark composes the selected policies
        ↓
effective governance policy
        ↓
request and response enforcement

Creating a GovernanceSet does not apply it globally.

Assignment is explicit per AnswerSet.

AnswerSet and ExecutionSet integration

The assigned GovernanceSets govern the AnswerSet request before provider generation or deterministic preflight. The same effective policy governs known answers, generated answers, and typed output. When an approved ExecutionSet action is connected to the AnswerSet, its resolved inputs and returned outputs are governed before they are exposed to the caller. The deterministic ExecutionSet resolution path fetches effective policy from the signed GovernanceSet service API, rather than reading legacy governance tables.

A GovernanceSet does not by itself authorize an ExecutionSet, approve an external destination, or replace the ExecutionSet’s actor, idempotency, and egress controls. Governance is a separate content and budget enforcement layer. A blocked output after a remote action has executed does not roll back that external side effect; inspect execution audit evidence before retrying.

Because policy assignments currently follow the mutable GovernanceSet, changes can affect multiple AnswerSets immediately. Review assignment impact before editing a shared policy. Immutable policy revisions and per-execution policy-version evidence are not yet available as production-certified guarantees.

Console workflow

Use Governance to:

  • create a GovernanceSet manually
  • use Make with provider to draft one
  • edit an existing GovernanceSet
  • import/export GovernanceSets
  • delete an unused GovernanceSet

Use an AnswerSet’s GovernanceSets management action to choose which sets it uses.

API base

GovernanceSet management is part of the Answers API:

https://lakeshark.dev/api/answers

Governance reads/evaluation require governance.read, and GovernanceSet changes require governance.write. Assignment additionally requires answers.write. These are enforced server-side; permissions on the console alone are insufficient.

API endpoints

Method Path Purpose
GET /v1/governance-sets List GovernanceSets
POST /v1/governance-sets Create a GovernanceSet
POST /v1/governance-sets/draft Generate a provider-assisted draft
GET /v1/governance-sets/{id} Read one GovernanceSet
PUT /v1/governance-sets/{id} Replace its name, description, and policy
PATCH /v1/governance-sets/{id} Partially update its fields or policy
POST /v1/governance-sets/evaluate Evaluate input/output text against a supplied policy without saving
DELETE /v1/governance-sets/{id} Delete an unused GovernanceSet
GET /v1/answer-sets/{answer_set_id}/governance-sets Read AnswerSet assignment and effective policy
PUT /v1/answer-sets/{answer_set_id}/governance-sets Replace AnswerSet assignment

Availability and failure behavior

LakeShark checks effective GovernanceSet assignments when processing questions, including requests with no assigned GovernanceSets. If that check is unavailable, LakeShark returns HTTP 503 rather than skipping enforcement. Explicit policy evaluations may also return 503 if the evaluation service is unavailable. See governance availability and errors for what your application should do.

Next