How to Make AI Follow Company Policy

Enterprise teams looking for technical solutions to enforce business rules in AI agents without retraining models.

The answer

The core problem is that large language models are probabilistic — they approximate the right answer rather than guaranteeing it. Company policies are deterministic — they have exact thresholds, eligibility rules, and required sign-offs. Corules bridges this gap by sitting between AI output and execution. AI proposes a decision; Corules evaluates it against your structured policy (expressed in CEL) before any action is taken. Compliant decisions proceed. Non-compliant decisions are blocked or escalated. The model never needs retraining when policy changes — only the parameters update.

How it works

Corules's policy runtime sits in the enforcement path between your AI agent and the action it wants to take. The agent sends a structured context payload to /v1/validate. Corules evaluates the context against a compiled CEL policy set and returns a structured decision — ALLOW, BLOCK, or ESCALATE — with a reason and audit ID.

Every decision is recorded in an immutable audit ledger. You can replay any past decision by providing the policy_set_version and the normalized input hash — the result will be identical.

Policy example

Policies are written in CEL (Common Expression Language). They are compiled once at publish time and evaluated in microseconds at request time.

// Example: enforce discount policy at runtime
// Policy logic doesn't change when rates change — only params update
discount_pct <= params.max_discount_by_tier[context.customer_tier]
  && (deal_value * (1 - discount_pct)) >= params.margin_floor

Frequently Asked Questions

Do I need to retrain the AI model when policy changes?

No. Corules separates policy logic from model logic. When your discount cap changes, you update a parameter — not the model. The CEL expression stays the same.

Does this work with any AI model?

Yes. Corules evaluates the structured output of any AI model. The model produces a proposed decision; Corules validates it. Model-agnostic by design.

What if the AI generates an output Corules doesn't recognize?

Unknown or malformed decision payloads are rejected. Missing required fields escalate. Safe defaults: on any failure, block or escalate, never silently allow.

How long does evaluation take?

Policy evaluation is deterministic CEL compiled at publish time. Evaluation latency is typically sub-10ms — fast enough for synchronous workflow integration.

See it working in your environment

Start free — no credit card, no sales call. Evaluate up to 1,000 decisions per month.

Get started free