Request a demo
Architecture

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

Prompt

The instruction

System + user template, variables, model binding. Immutable, semver-versioned, with a draft → certified lifecycle.

Context

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.

Release

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.

PatternMechanismBest for
Managed gatewayPOST /run {inputs} → answer + sourcesMax governance, thin apps, regulated data
Prompt-fetchFetch the resolved, filled prompt; you call the modelApps that own their model infra
SDK + cacheClient lib fetches versioned assets, caches with fallbackLow latency, resilience, high volume
Build-time bundleCI compiles pinned versions into the app artifactAir-gapped, edge, hermetic builds
Config / git syncAssets synced to git / config / a busExisting GitOps shops
Recommended

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

Principle

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.

Principle

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.

Principle

Govern context like prompts

Context is how regulated data enters. It carries eval checks that gate certification, and sensitivity is computed across prompt + context.

Principle

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.

Bring this architecture to your AI program

InsightPrompts is a ready implementation — registry, versioning, eval, gateway, and SDKs. Run it locally in minutes or talk to us about your environment.

Run it locally