Manage prompts & context once, use them everywhere
A reference architecture for treating prompts — and, where it helps, context — as versioned, governed assets in one central place, consumed by any application through APIs, SDKs, or build-time bundles.
Split the control plane from the data plane
The control plane is where people author, version and govern. The data plane is what your apps touch — thin, fast, and resilient, so the central system is never a bottleneck or a single point of failure.
┌──────────── CONTROL PLANE (central) ────────────┐ Authors / reviewers → Authoring UI · Registry · Versioning · Lifecycle Eval · Governance · Approvals · Audit └───────────────┬─────────────────────────────────┘ │ publish immutable versions ┌───────────────▼──────────── DATA PLANE (runtime) ┐ Your apps → Distribution: REST gateway · SDK(+cache) · build bundle Resolution: fill prompt · resolve context · call model └──────────────────────────────────────────────────┘ │ every call → traces · cost · lineage
Three versioned assets
The instruction
System + user template, variables, model binding. Immutable, semver-versioned, with a draft → certified lifecycle.
The data binding
A typed, reusable binding — pasted text, document(s), a data location, or a natural-language→SQL query — resolved at run time. Centralize it when it’s worth governing.
The callable unit
Pins a prompt version + context versions + model, and declares the inputs your app supplies per request. This is what apps call.
Bound context vs open inputs is the reuse mechanism: bound context (the folder, the SQL) is resolved by the release; open inputs (e.g. a policy number) are supplied per call. One release serves thousands of requests.
How your apps consume it
Pick per app by latency, governance, and offline needs — most teams use two or three together.
| Pattern | Mechanism | Best for |
|---|---|---|
| Managed gateway | POST /run {inputs} → answer + sources | Max governance, thin apps, regulated data |
| Prompt-fetch | Fetch the resolved, filled prompt; you call the model | Apps that own their model infra |
| SDK + cache | Client lib fetches versioned assets, caches with fallback | Low latency, resilience, high volume |
| Build-time bundle | CI compiles pinned versions into the app artifact | Air-gapped, edge, hermetic builds |
| Config / git sync | Assets synced to git / config / a bus | Existing GitOps shops |
Default to the SDK + cache for fetching, and the managed gateway whenever context must be resolved server-side (so connector secrets never reach the app). The SDK falls back to its cache if the control plane is briefly unreachable — the registry is never a hard dependency of your request path.
Principles that keep it governable
Immutable versions
Never mutate a published version — publish a new one. Pins are exact in prod, floating in dev, and floating only advances behind a passing eval gate.
One step, not a workflow
A release resolves context and makes one model call. Chaining and tools belong in the calling app — this boundary is what keeps the platform clean.
Govern context like prompts
Context is how regulated data enters. It carries eval checks that gate certification, and sensitivity is computed across prompt + context.
Provenance & secrets
Every answer returns its sources and a trace id. Context resolves server-side, so SharePoint / warehouse credentials never reach the app.
A pragmatic adoption path
1. Registry + SDK fetch — versioned prompts, semver, an SDK with cache. Kills copy-pasted prompts immediately.
2. Lifecycle + approvals + prompt eval gate; aliases for prod/staging.
3. Managed gateway for params-in / answer-out apps; add traces and cost.
4. Context as an asset — start with the highest-value reusable bindings; server-side resolution; context eval gates.
5. Rollout tooling — canary / champion-challenger, drift alerts, blast-radius reports.