Custom Model Creation
When the pre-built policy catalog does not cover a violation type specific to your organization, WonderFence allows you to create custom detection policies.
How it works:
- Define the policy — Provide a descriptive name, detailed guidelines explaining what should be detected, and example texts of both acceptable and violating messages.
- Generate the model — WonderFence builds a custom Small Language Model (SLM) tailored to your guidelines and examples. Model generation completes within approximately 24 hours.
- Configure and enable — Enable the policy for the applications it should protect by selecting them in the Applications dropdown, then configure message type targeting and enforcement action.
Custom models integrate seamlessly with the rest of the policy catalog. They appear alongside system policies and support the same configuration options, analytics, and workflow integrations.
Create a policy:
Clicking Create Policy on the Enforcement Policies page opens a full-page, two-step wizard: Create Policy followed by Train Policy. Step 1 collects the policy definition and your examples:
| Field | Description |
|---|---|
| Policy Name | A concise name representing the policy. |
| Type | The detection group the policy belongs to. Required — choose Safety, Privacy, or Security. The available enforcement actions follow your choice: Privacy policies offer Redact (Mask) in addition to Warn (Detect) and Block, and start on Redact. |
| Policy Guidelines | Specific guidelines or criteria that define what constitutes a violation of this policy. Must be at least 100 characters — a live character counter under the field shows your progress toward the minimum. Use Upload from File to populate the guidelines from a .txt or .pdf file. |
| Benign Examples | Exactly 5 example messages that represent acceptable, non-violating behavior. See Entering your examples below. |
| Violative Examples | Exactly 5 example messages that violate this policy. See Entering your examples below. |
Below the definition, the same Policy Setup controls described under Policy Configuration are available on step 1 — the Applications dropdown first, then message type targeting, the action mode with its action or rules and block message, and keyword augmentation — so a new policy can be fully configured before it is ever created.
Entering your examples:
Each set of examples is a deck of 5 cards that you fill in one at a time. The cards still to come are stacked behind the one you are writing in, and the counter under the deck (for example, 2/5) shows where you are. Next becomes available once the current card has text, and Previous takes you back to review or edit an earlier card — nothing you have typed is lost as you move between them.
Instead of typing all 5, you can use Upload from File to import them from a .csv, .xlsx, or .tsv file. The first column of the file is used, a header row such as "example" or "prompt" is ignored, and the imported values replace the whole deck and return you to the first card. Files with fewer than 5 examples leave the remaining cards blank for you to complete; anything beyond the first 5 is ignored.
Once the definition, examples and setup are valid, Next advances to Train Policy. Arriving there starts the work of drafting your policy and generating candidate responses for it, which takes about a minute; the step shows what it is doing and then counts the responses off as they are labelled. If that work cannot be completed, the step says so and offers Try again — nothing has been created at that point, and you can also go back to adjust the policy definition and start over.
Once the responses are ready, the system asks "Do you agree with each verdict about the following responses?" and shows you a round of them, each with the verdict it proposed — Verdict: Benign or Verdict: Violative — below the text. Confirm (👍) or reject (👎) each one to teach the policy. Longer responses are shortened to two lines with a Show More link that expands them in place. The number of responses is decided per policy, so the rounds are not always the same size.
Training runs as a short sequence of rounds, and the round you are on is shown above the list as Round 1 of 2. Each round is built from the one before it: when you have judged every response in a round, Next folds your verdicts into the policy and generates a fresh round against the improved version, which takes about a minute. The step tells you what it is doing while it works and counts the responses off as they are labelled, and Next stays unavailable until that finishes. On the final round the button becomes Create instead.
Rejecting opens a small floating box where you can say what the verdict got wrong. The note is optional — the rejection counts either way, and you can close the box with Done or by clicking anywhere outside it. What you type is kept as you type it, so nothing is lost when the box closes. Once written, the note is shown under the verdict as Your note:, and clicking 👎 again reopens the box so you can change it. Switching that response back to 👍 clears the note. After you review every round, Create is enabled; it asks you to confirm, because submitting locks the policy and starts model generation, and then returns you to the catalog.
Your verdicts are not just training signal — they are used to rewrite the policy itself, so the guidelines saved on the created policy are a fuller version of what you wrote on step 1, expanded with the criteria your confirmations and rejections established. You can read and edit them afterwards in the Policy Editor. If that rewrite cannot be completed, the policy is still created, keeping the guidelines exactly as you typed them.
Viewing a created policy: opening a policy from the catalog shows its definition the way you entered it — the guidelines, then Benign Examples and Violative Examples as two separate read-only decks, in the same order the create form collected them. A policy that carries no benign examples — one created before the two-step wizard — shows its violations as a single Examples list instead.
If model generation fails: the policy card shows an alert indicator, and a Rerun Training action becomes available in the card's menu (the ⋮ icon). Selecting it re-initiates model generation using the policy's existing guidelines and examples — there is no need to recreate the policy. If training keeps failing, contact support.