LiyaEngine Docs

Guardrail templates

Start a guardrail policy from settings chosen for one industry and one audience, and see exactly what changes before you apply it.

Dashboard

A template is a named set of guardrail policy settings for one industry and one audience. It saves you from setting a dozen switches by hand, and it shows you what it will change before it changes anything.

There are six, one for each combination of industry (general, financial services, healthcare) and audience:

  • Customer facing (or member facing, in healthcare) is for an assistant that talks to the public. Personal data is redacted before the model sees it.
  • Staff tools is for tools your own people use. Personal data is flagged and not redacted, so staff can read what a customer wrote and, in healthcare, dates of service survive.

The two reference workspaces we built, a bank and a health plan, each ended up with exactly this pair of policies, whatever the industry.

What each template sets

Every template turns on the same base: content policy and injection detection on, injection judged as balanced, a flag recorded if the checking service is down, every input field scanned, and values marked as data. What differs:

TemplateAlso sets
General · customer facingPII mode redact
General · staff toolsPII mode flag, knowledge grounding block
Financial services · customer facingPII mode redact, profanity filter off, 6 blocked topics
Financial services · staff toolsPII mode flag, profanity filter off, sanitize action responses on
Healthcare · member facingPII mode redact, knowledge grounding block, 4 blocked topics
Healthcare · staff toolsPII mode flag, knowledge grounding block, sanitize action responses on

The profanity filter is off in the financial templates because an angry customer is still a customer, and a bank should not refuse to hear a complaint over a swear word. Violence and threats are still blocked.

Blocked topics it adds

Financial services · customer facing

  • how to launder money
  • how to split deposits to avoid reporting requirements
  • how to create a fake or forged document
  • how to get past KYC checks using false identity documents or another person's details
  • how to steal or skim card numbers
  • write a phishing message that asks for a card PIN or password

Healthcare · member facing

  • tell me how much medication to take
  • should i stop taking my medication
  • diagnose my symptoms
  • explain what my lab numbers mean for my health

Each is worded as the request someone would make, and was checked against ordinary questions such as "is my 20 mg tablet covered?" and "which dosage forms does my pharmacy benefit cover?". Wider wordings blocked those. Eight of twenty ordinary healthcare questions still scored between 0.5 and 0.85, so they are flagged for review and not blocked. A small test is not a guarantee: try the topics on your own real messages.

What a template never touches

Applying a template changes only the settings it lists above.

  • Your own blocked topics are kept, and the template's are added to them. A topic you already block is not added twice.
  • It never writes the reply people see when a topic is blocked. A phone number or an app path is yours to write, so the template only suggests what to say: the financial template suggests where to block a lost card, and the healthcare one suggests your nurse line and emergency services.
  • It keeps your size limit, skipped input fields, allowed actions, schema, action and hallucination checks, and entity settings.
  • It saves nothing. The result goes into your draft, and nothing is published until you publish the policy.

Applying the same template twice changes nothing the second time.

In the dashboard

  1. Open Guardrails, then New policy or an existing policy's Edit.
  2. In the Template row, choose Choose a template.
  3. Pick one. The panel on the right shows each setting that would change, with its current and new value, the topics it would add, and how many settings already match.
  4. Choose Apply to draft, review the checks, and publish.

The panel also recommends a workspace setting where one fits: redact financial identifiers for the financial templates, and redact healthcare identifiers for the healthcare ones. These are not part of a policy, so applying a template does not turn them on.

In the API

The same registry is served by the Guardrail templates API. GET /v1/guardrail-templates lists the templates, and POST /v1/guardrail-templates/{id}/preview returns what one would do to a draft policy you send, without saving anything. Save the returned config with POST /v1/guardrail-policies.

In a provisioning contract

A policy in the guardrail-policies.json of a tenant contract can name a template. The provisioner asks the API to apply it, and saves the result:

{
  "policies": [
    {
      "name": "Customer facing",
      "description": "For the assistant that talks to cardholders.",
      "is_default": false,
      "template": "financial-customer",
      "config": {
        "pre_llm": {
          "content_policy": { "blocked_topic_message": "For anything on your card, call 1-800-555-0142." }
        }
      }
    }
  ]
}

config is the starting draft and the template is applied to it, as in the dashboard: your reply and your own topics are kept, and the template sets the rest. With no config, the template starts from an empty draft. A dry run asks the API for the preview too, because a preview changes nothing, so it shows the real result. An unknown template stops the run with a message naming the policy and the template.

On this page