What instructions are for
- Natural language — No need to write structured rules. Describe the policy in prose or bullets.
- Flexible interpretation — The system interprets your intent (e.g. “Block requests over $10,000” or “Escalate when the user is high risk”).
- Same three outcomes — Every request still gets a clear allow, block, or escalate decision.
How instructions work
- In the policy editor, you write instructions in the Instructions tab (e.g. bullets or short paragraphs).
- For each request, Limits evaluates the payload and your instructions together.
- The result is still allow, block, or escalate with a reason.
Writing good instructions
- Be explicit about outcomes: “Block any payment over $5,000.” “Escalate when risk level is high.”
- Mention key fields if they matter: amount, user risk, resource type, etc.
- Default behavior: State what happens when nothing special applies (e.g. “Otherwise allow.”).
- Block any request where the amount exceeds $10,000.
- Escalate to review when the user’s risk level is high.
- Allow all other requests and log them.
Example
Policy in Instructions mode:- “Block any payment over $5,000.”
- “Escalate to review when risk level is high.”
- “Otherwise allow and log the request.”
{ amount: 100 } → Allow.Request
{ amount: 6000 } → Block.Request
{ amount: 100, user: { risk_level: 'high' } } → Escalate.
Evaluating instructions (SDK and API)
- SDK: Use
limits.evaluate(policyKeyOrTag, prompt, response)wherepromptis the user prompt andresponseis the LLM output (or input to validate). See SDK Policies. - API:
POST /api/policies/{policyKey}/evaluate/instructionswith body{ "request": { "prompt": "...", "input": "..." } }. See API Reference.