Custom evaluation policies
Alongside predefined policies, you can create custom policies based on user-defined criteria and use cases.
Custom evaluation criteria and prompt templates let you measure what actually matters for your application. For example, you might create a custom eval to check for regulatory compliance, tone consistency, or task completion accuracy.
Create a custom policy
In the Policy Catalog, select Create, or select the Create a custom policy tile under Custom policies.
-
Under Details, pick a Policy type, either Quality or Security, then enter a Policy name and Description.
-
Under Instructions, describe what you expect the policy to do. Your instructions must include at least one variable. Select {prompt}, {response}, or {chat_history} beneath the field to insert one.
-
Turn on Evaluate my system prompt to score your system prompt alongside the content.
-
Under Criteria, fill in both sides. Prohibit flags content that includes what you describe. Acceptable keeps content that includes what you describe from being flagged. Add at least one example to each, and select Add Example for more.
-
Under Add to application, select the applications the policy applies to. Search by name if the list is long.
Provide detailed instructions, clear criteria, and concrete examples. More detail helps the policy produce better results.
Magic variables
Policy instructions support special variables that reference the content being evaluated:
| Variable | Description | Usage |
|---|---|---|
{prompt} | The user's input prompt | Evaluate prompt content |
{response} | The LLM's response | Evaluate response content |
{chat_history} | Full conversation history | Evaluate context across turns |
Instructions must include at least one of these variables.
Custom policy example
Name
Financial advice evaluator
Description
Flags assistant responses that recommend specific investments or allocations without a clear "not financial advice" disclaimer, while allowing general education or refusal.
Instructions
Analyze the {response} for specific financial advice that could be construed as professional investment recommendations. Focus on whether the response recommends specific stocks, cryptocurrencies, funds, or investment allocations without appropriate disclaimers.
Prohibit
The response provides specific investment recommendations (such as "buy this stock" or "put your money in Y fund") or suggests specific portfolio allocations without including a clear disclaimer that the information is not professional financial advice.
Acceptable
The response does one or more of the following:
- Does not discuss specific investments.
- Provides only general educational information about financial concepts.
- Discusses investments and includes a clear disclaimer that it is not professional financial advice and that readers should consult a licensed advisor.
- Declines to provide investment advice.
Manage existing custom policies
To manage an existing custom policy, open the policy card and select More actions.
Edit
Select Edit to open the policy page and update the policy. You can edit the policy description and details, including the instructions or examples.
Delete
Select Delete to remove the policy from the Policy Catalog and from all applications where it is applied.
Next steps
Monitor AI coding agent activity with Code Agents Intelligence.



