Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fai%2Fevaluations%2Fcustom_policies.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fcoralogix.com%2Fdocs%2Fuser-guides%2Fai%2Fevaluations%2Fcustom_policies.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# 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[​](#create-a-custom-policy "Direct link to Create a custom policy")

To create a custom policy, select **+ Create Custom Policy** from within the Policy Catalog.

1. Select a policy type: **Quality** or **Security**.

2. Enter a policy name and description.

3. Define what the policy should check. Enter policy instructions that describe what you expect the policy to do, with at least one dynamic variable included: `{prompt}`, `{response}`, or `{chat history}`.

4. Choose what to evaluate. Include at least one variable:

   * Prompt
   * Response
   * Chat history

5. Choose whether to evaluate the system prompt.

6. Define the criteria:

   * Prohibited cases
   * Acceptable cases
   * Examples of conversations for each category

7. Select which applications to apply the policy to.

Provide detailed instructions, clear criteria, and concrete examples. More detail helps the policy produce better results.

### Magic variables[​](#magic-variables "Direct link to 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[​](#custom-policy-example "Direct link to Custom policy example")

### Name[​](#name "Direct link to Name")

Financial advice evaluator

### Description[​](#description "Direct link to Description")

Flags assistant responses that recommend specific investments or allocations without a clear "not financial advice" disclaimer, while allowing general education or refusal.

### Instructions[​](#instructions "Direct link to 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.

### Prohibited[​](#prohibited "Direct link to Prohibited")

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[​](#acceptable "Direct link to Acceptable")

The response does one or more of the following:

1. Does not discuss specific investments.
2. Provides only general educational information about financial concepts.
3. Discusses investments and includes a clear disclaimer that it is not professional financial advice and that readers should consult a licensed advisor.
4. Declines to provide investment advice.

## Manage existing custom policies[​](#manage-existing-custom-policies "Direct link to Manage existing custom policies")

To manage an existing custom policy, open the policy card and select **More actions**.

### Edit[​](#edit "Direct link to 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[​](#delete "Direct link to Delete")

Select **Delete** to remove the policy from the Policy Catalog and from all applications where it is applied.

## Next steps[​](#next-steps "Direct link to Next steps")

Monitor AI coding agent activity with [Code Agents Intelligence](https://coralogix.com/docs/docs/user-guides/ai/code-agents/.md).
