Assign to AnswerSets
Attach GovernanceSets to AnswerSets and inspect the effective policy.
GovernanceSet assignment is explicit.
Creating a GovernanceSet does not automatically affect any AnswerSet.
Graph pins and runtime assignments
Use the read and replace APIs below to inspect and configure the GovernanceSets applied to AnswerSet incoming questions. These assignments are separate from version-pinned GovernanceSet nodes in an independent Flow. Saving or publishing a Flow does not replace an AnswerSet’s direct governance assignments. Consult Flow Studio for Flow-specific governance behavior and its current release status.
All assigned GovernanceSets are enforced together. Replacing assignments changes live behavior; preserve every intended existing assignment when submitting the complete list.
Read the assignment
GET https://lakeshark.dev/api/answers/v1/answer-sets/{answer_set_id}/governance-sets
Authorization: Bearer <ACCESS_TOKEN>
Representative response:
{
"governance_sets": [
{
"id": "5fd9ed9b-4ac3-4dfd-aee1-040f312423e0",
"name": "Corporate PII",
"description": "Protect common identifiers.",
"policy": {
"pii_action": "redact",
"profanity_action": "block",
"prompt_injection_action": "block",
"blocked_terms": [],
"max_input_tokens": 8000,
"max_output_tokens": 1000,
"max_provider_calls": 1
},
"position": 0
}
],
"governance_enabled": true,
"effective_governance": {
"pii_action": "redact",
"profanity_action": "block",
"prompt_injection_action": "block",
"blocked_terms": [],
"max_input_tokens": 8000,
"max_output_tokens": 1000,
"max_provider_calls": 1
}
}
The effective_governance field shows the composed policy LakeShark will enforce.
Replace the assignment
PUT https://lakeshark.dev/api/answers/v1/answer-sets/{answer_set_id}/governance-sets
Authorization: Bearer <ACCESS_TOKEN>
Content-Type: application/json
{
"governance_set_ids": [
"5fd9ed9b-4ac3-4dfd-aee1-040f312423e0",
"e15f904a-c594-4c37-9815-28b06448194e"
]
}
This operation replaces the complete assignment. It is not an append operation.
To remove all GovernanceSets:
{
"governance_set_ids": []
}
Change impact
A GovernanceSet is shared policy.
If you edit a GovernanceSet, every AnswerSet assigned to it will use the updated policy.
Review affected AnswerSets before changing a widely reused set.