Implementation Guide

Routing LLM Prompts to In-Region Endpoints Based on Data Classification

To route LLM prompts by data classification, evaluate sensitivity for each request at runtime, map the result to an allow-list of region-pinned endpoints in a versioned policy, and enforce that decision at a gateway that is the only network path to model APIs. If no compliant endpoint is available, fail closed rather than falling back out of region, and log every decision with enough detail to show where the prompt was processed.

Routing is a policy enforcement problem

Routing prompts by data classification comes down to enforcing a policy. A versioned policy maps each classification result to an allow-list of region-pinned endpoints, and that decision has to be applied at a point that applications and agents cannot bypass.

The pattern has four stages, summarized below. The sections that follow explain how classification, enforcement, and fallback behavior fit together, and what to record as audit evidence.

Routing decision path

  1. ClassifyCombine labels, metadata, and inline detection into one sensitivity result per request or session.
  2. DecideEvaluate a versioned policy that maps classification to permitted endpoints and regions.
  3. EnforceApply the decision at a gateway that applications and agents cannot bypass.
  4. RecordLog classification, policy version, endpoint, region, and outcome for each request.

Determine classification at request time

Evaluate sensitivity for each request at runtime rather than relying on a fixed assumption about the application or user. Combine labels, metadata, and inline detection into one sensitivity result per request or session, so the policy has a single classification to act on.

Choose where the decision is enforced

Map the classification result to an allow-list of region-pinned endpoints in a versioned policy, and enforce the decision at a gateway. The gateway should be the only network path to model APIs, so that applications and agents cannot bypass the routing decision.

Fail closed without breaching residency

If no compliant endpoint is available, fail closed rather than falling back out of region. A blocked request is recorded with its reason, and any rerouting stays within the allow-list for that classification.

Record audit evidence for each routing decision

Log every decision with enough detail to show where the prompt was processed. Each record should include:

  • Request identifier, timestamp, and the calling user, application, or agent identity
  • Classification result and the signals that contributed to it
  • Policy version and the rule that matched
  • Selected endpoint, provider, and region
  • Outcome: allowed, rerouted within the allow-list, or blocked, with the reason
  • Response status and any retry or fallback attempts

Review your runtime routing controls

Talk to an expert about enforcing data classification policy and recording audit evidence for AI traffic in your environment.

Talk to an Expert