Skip to content
AgenticAIWiki
  1. Learn
  2. Part 12
  3. 66. Governance and compliance
  4. 66.3

Lesson 66.3 · 3 of 7 · 5 min read · Reviewed 24 Nov 2026

Data residency and where prompts are processed

By the end, you can

  • Tell apart where data is stored and where prompts are processed.
  • Check a model platform's routing options against a residency commitment.

Lesson 70.4 mapped every place data travels in an AI system. This lesson looks at the part that is newest and easiest to get wrong: where the prompt is processed, meaning where the model actually reads it.

Stored versus processed

Question Example answer
Where is the data stored? Our database and backups are in Frankfurt
Where is the prompt processed? The model runs in whichever region the platform routes to
Where is it accessed from? Support engineers in two other countries can view logs
Who else handles it? The tracing vendor and the model platform, each a sub-processor

A residencyData residency: A requirement that data is stored or processed in a particular country or region. commitment in a contract may cover storage only, or storage and processing, or name specific countries. Read the exact words. “Your data stays in the EU” is usually understood to include processing.

Routing options

Model platforms balance load across data centres. Cloud platforms that host models commonly offer:

  • A single region: the request is processed in the region you call.
  • A geographic routingRouting: A workflow pattern that classifies an input and sends it to a specialised prompt, model or handler. option: requests may move between regions inside a named geography, such as a set of EU or US regions.
  • A global routing option: requests may go to any region with capacity.

The wider options give more capacity and fewer rate-limitRate limit: A cap on how many requests or tokens you can use in a period, such as per minute. errors, which is why teams switch to them during a capacity crunch. That switch can silently break a processing commitment. Check each platform’s docs for what its options are called and which regions they include today.

Questions to ask each vendor

  1. In which regions are prompts and outputs processed, and can we pin that?
  2. Where, and for how long, is anything stored (66.2)?
  3. From which countries can the vendor’s staff access our data, and when?
  4. Which sub-processors handle it?
  5. If capacity runs out, does the service fail, queue, or route elsewhere?

Ask the same questions of your own failover plan (70.3): a fallback to another region or platform must stay inside the same boundary.

Worked example

A health-records startup serves clinics in one EU country and promised EU processing.

  • Their primary path uses a model in an EU region through a cloud platform, with a routing option limited to EU regions.
  • Their fallback is the same model on a second platform, also pinned to EU regions, tested monthly.
  • TracesTrace: A record of everything that happened during one request or agent run, as a tree of timed steps. go to a self-hosted tool in the same cloud account.
  • They wrote down what happens when EU capacity is exhausted: requests queue and the UI shows a delay. They do not fall back to a global option.

They accepted a little more latencyLatency: The time from sending a request until you get the response, or until the first token arrives when streaming. at peak in return for a promise they can keep.

Transfers

If personal dataPII: Personally identifiable information: data that can identify a person, such as name, email, address or ID numbers. does leave a jurisdiction, many data protection laws require a legal basis for the transfer, such as an adequacy decision or contractual safeguards under the GDPR’s rules on international transfers. That is a question for your legal team; your job is to know, and document, exactly where the data goes.

Common mistakes

  • Pinning the main model call but letting traces, caches or embeddingsEmbedding: A list of numbers (a vector) that represents the meaning of a piece of text, so similar meanings land close together. go elsewhere.
  • Turning on global routing to fix a rate-limit incident at 2 a.m.
  • Assuming the vendor’s headquarters country is where processing happens.

This is general guidance, not legal advice.

Key points

  • Storage residency says where data rests; processing location says where the model actually reads the prompt. Commitments may cover one or both.
  • Cross-region and global routing options move inference to wherever capacity is free, which can break a processing promise.
  • Ask every vendor in the path: where is it processed, where is it stored, who can access it from where, and which sub-processors are involved.
Hands-on labRuns in the Playground

Check routing against a residency promise

Test every component in the data path against an EU processing and storage promise.

You will have: A violations() check that lists every component and capacity plan that can leave the EU, plus a fixed path list.

Steps

  1. Run the starter: it reports nothing, which proves nothing.
  2. Flag any region outside the EU set, treating the global option "*" as outside.
  3. Flag a capacity plan that routes globally instead of queueing.
  4. Build FIXED with EU-only routing for the fallback and an EU region for embeddings, then check again.

Done when

  • The fallback model, the embeddings and the capacity plan are flagged.
  • The primary model, traces, cache and backups pass.
  • The fixed path list has 0 violations.

Open in the Playground No API key needed.

Starter code (Python)
# Check every part of the data path against a promise: "prompts are stored and processed in the EU".
# Region names are made up for the lab. "*" means the platform may route to any region with capacity.
EU = {"eu-frankfurt", "eu-paris", "eu-dublin", "eu-milan"}

PATHS = [
    # (component, what happens there, regions it may use)
    ("primary model",   "processing", {"eu-frankfurt", "eu-paris", "eu-dublin"}),  # EU-only routing option
    ("fallback model",  "processing", {"*"}),                                        # global routing option
    ("embeddings",      "processing", {"us-virginia"}),
    ("traces",          "storage",    {"eu-frankfurt"}),
    ("semantic cache",  "storage",    {"eu-paris"}),
    ("backups",         "storage",    {"eu-dublin", "eu-milan"}),
]
WHEN_CAPACITY_RUNS_OUT = "route_global"  # what the runbook says to do at 2 a.m.


def violations(paths, on_capacity):
    found = []
    # TODO 1: for each path, list the regions that are not in EU ("*" counts as outside) and add a line
    # TODO 2: the capacity plan must be "queue"; anything else breaks the processing promise
    return found


for v in violations(PATHS, WHEN_CAPACITY_RUNS_OUT):
    print("VIOLATION", v)

# TODO 3: build FIXED from PATHS with EU-only regions for the fallback model and the embeddings
FIXED = PATHS
print(f"after fix: {len(violations(FIXED, 'queue'))} violations")
Show a solution
# Check every part of the data path against a promise: "prompts are stored and processed in the EU".
# Region names are made up for the lab. "*" means the platform may route to any region with capacity.
EU = {"eu-frankfurt", "eu-paris", "eu-dublin", "eu-milan"}

PATHS = [
    # (component, what happens there, regions it may use)
    ("primary model",   "processing", {"eu-frankfurt", "eu-paris", "eu-dublin"}),  # EU-only routing option
    ("fallback model",  "processing", {"*"}),                                        # global routing option
    ("embeddings",      "processing", {"us-virginia"}),
    ("traces",          "storage",    {"eu-frankfurt"}),
    ("semantic cache",  "storage",    {"eu-paris"}),
    ("backups",         "storage",    {"eu-dublin", "eu-milan"}),
]
WHEN_CAPACITY_RUNS_OUT = "route_global"  # what the runbook says to do at 2 a.m.


def violations(paths, on_capacity):
    found = []
    for name, kind, regions in paths:
        outside = sorted("any region" if r == "*" else r for r in regions if r not in EU)
        if outside:
            found.append(f"{name} ({kind}) may use {', '.join(outside)}")
    if on_capacity != "queue":
        found.append(f"capacity plan '{on_capacity}' leaves the EU; it should queue instead")
    return found


for v in violations(PATHS, WHEN_CAPACITY_RUNS_OUT):
    print("VIOLATION", v)

# The fix: EU-only routing for the fallback, an EU region for embeddings, and queue when EU capacity is full.
FIXED = [
    (n, k, {"eu-frankfurt", "eu-paris"} if n == "fallback model" else {"eu-frankfurt"} if n == "embeddings" else r)
    for n, k, r in PATHS
]
print(f"after fix: {len(violations(FIXED, 'queue'))} violations")
Quick checkYour EU customers were promised that prompts are processed in the EU. Your platform offers a global routing option for extra capacity. What should you do?
How sure are you?
Pick an answer and how sure you are