Cruxly

Cruxly › Forward deployed engineer › Decomposition Cases

Deploying an LLM App Inside a Customer's Air-Gapped Environment

every missing piece costs a full transfer cycle, so you prove the environment before you build the app

Open the interactive lesson

Prompt: a defense-adjacent manufacturer wants a document question-answering assistant for their engineers, running on their own hardware, inside a network that has no connection to the internet. They have "a couple of GPU servers" and a security team that must approve anything brought in. You have an approved laptop, a signed-off list of people, and a project window of roughly ten weeks.

45 minutes first. The tempting read is "swap the hosted API for an open-weights model and ship the same app." The actual first problem is that you cannot see the machine you are deploying to, you cannot download anything when something is missing, and every correction has to be carried in by hand.

Clarifying questions that matter here

"What exactly does 'air-gapped' mean here: fully disconnected, or is there a controlled one-way transfer?" Customers use the word loosely. Some mean no route to the internet but a transfer station for approved media; some mean a one-way data diode; a few mean truly nothing in or out except a person carrying a drive. The answer sets your iteration speed, and iteration speed is the real constraint on this whole project.

"How long does one 'carry-in' take from request to files on the target machine?" For example, if every transfer needs a malware scan, a security-office sign-off and an escorted visit, that might be five working days. At five days per cycle you get maybe eight or nine attempts in the whole project, which means you cannot debug by trial and error. You have to build a copy of the environment on the outside and be right most of the time.

"What hardware is actually there?" "A couple of GPU servers" could be anything from two older cards with 16 GB of memory each to a modern multi-GPU box. The memory per card decides which model sizes are even possible, and driver and CUDA versions decide which inference software will run at all. Ask for the exact model names, driver version, operating system and kernel, and whether anything else already shares those GPUs.

"Who approves software, and what do they need to see?" Many security teams want a list of every package with versions and hashes, sometimes the licenses, sometimes the source. Ask early whether open-weights model licenses are acceptable to their legal team, because that gate can quietly end the project in week eight.

"What are the logs allowed to contain, and where may they go?" In a sealed environment you still need logs, since that is how you will debug. But the questions asked and answers given may themselves be sensitive. Find out who can read them, how long they are kept, and whether anything may ever leave the environment, even a scrubbed error count.

The decomposition: probe, bundle, serve, measure, then update

Slice 0 — an environment probe, carried in first. Before any model or app, bring in one tiny, reviewable script and a very small model. The script reports the operating system, GPU model and memory, driver version, free disk, which Python or container runtime is present, and whether it can load the small model and answer one prompt. It sounds trivial, and it is the most valuable thing you will carry in, because it turns a dozen guesses about the machine into facts after a single transfer. It is also the first item the security team reviews, so you learn how their gate works on something harmless.

Slice 1 — a reproducible offline bundle, built on a mirror outside. Build a staging machine on your side that matches the probe's findings as closely as you can: same OS family, same driver version, ideally similar GPU memory. Package everything the app needs as pinned container images or wheel files, plus the model weights, plus a manifest that lists every file with its version and checksum. The rule is that the bundle must install with the network cable unplugged on the staging machine before it is ever carried in. Anything that tries to fetch something at startup, such as a tokenizer download or a telemetry ping, fails there instead of on the customer's site.

Slice 2 — serve the model locally and put the app behind a local endpoint. Run an inference server on the customer's GPUs and expose a plain local HTTP interface. Keep the application code talking to that interface rather than to a vendor library, so swapping the model, the quantization level or the server is a configuration change, not a rewrite. Retrieval over their documents runs inside too: the vector store and embedding model are part of the bundle, not an outside service.

Slice 3 — an offline evaluation harness. Carry in a small golden set: for example 60 to 100 questions with answers the customer's own engineers agreed on, written by them and kept inside. The harness runs the assistant against it and records scores, so every future model or prompt change gets a before-and-after number without any data leaving. Without this slice you cannot answer the question every executive eventually asks: "is the new version better?"

Slice 4 — the update path. Define what an update is: a versioned bundle with a manifest, a verification step that checks every hash on arrival, a one-command install, and a one-command rollback to the previous version that stays on disk. Decide the cadence with the customer, for example a monthly planned release plus an emergency path for security patches, and rehearse the rollback once before anyone depends on it.

Why this order: if you build the assistant first and discover on the target that the driver is too old for your serving software, you have spent a transfer cycle and weeks of work on a guess. Probing first makes the expensive discoveries cheap.

The riskiest unknown, and what you honestly promise

The riskiest unknown is whether a model good enough for their documents fits on their GPUs. Everything else is plumbing. A hosted frontier model may be hundreds of billions of parameters; what fits on two modest cards is usually a model a fraction of that size, often quantized to save memory. So the first test is not "does the app work" but "does a model that fits answer their kind of question well enough to be useful." Run that test on the mirror with a handful of real-looking questions in week one, using your best guess at their GPUs, then confirm on the real machine the moment the probe's results arrive.

First light. Define a single milestone the customer can see: on the real server, inside the real network, one engineer asks one question about one real document and gets a grounded answer with its source. Not a dashboard, not user accounts. That sentence is the proof that the environment, the bundle, the model, retrieval and the security gate all work together. Everything after it is improvement, and you can show the customer the date you reached it.

Honest expectations. Say plainly, early, and with the eval set as evidence: the answers will probably be somewhat weaker than what they have seen from hosted tools, and the way to close the gap is to narrow the task (their documents, their vocabulary, a few well-tested prompt patterns) rather than to promise parity. Also say that fixes arrive on a schedule, not instantly: "a bug found on Monday may only be fixed on your machine the following Friday, which is why I want the mirror and the eval set before anything else." A customer who hears this in week one is far calmer in week six than one who discovers it.

Logging without phoning home. Keep structured logs locally: request ID, timings, model version, which documents were retrieved, and error types. Store the content of questions and answers separately with stricter access, or not at all if the customer prefers. When you need help from outside, produce a support bundle on request: counts, timings, versions and error codes, with content stripped, which the customer's security team reads and approves before it leaves. You debug from that, and nothing leaves automatically.

Follow-ups they will ask

"A security advisory comes out for a library in your bundle. Can you patch it by tomorrow?" Not by tomorrow in the way a connected service could, and pretending otherwise is the dangerous answer. The honest version: "I can have a patched bundle built and tested on the mirror within a day, and then it goes through your transfer and review process, so the real clock is your gate." Then propose an emergency path agreed in advance, so the gate is quick for security patches and slower for features. That conversation is much better held in week two than during the incident.

"The assistant gave a wrong answer to an engineer and we can't send you the conversation. How do you debug?" You debug with their help rather than around them. Ask for the retrieved passages and the model version through a person at the customer's site, reproduce the failure on the mirror with a non-sensitive document that has the same shape, and add that case to the eval set. The goal is that every real failure becomes a permanent offline test, which is the only way quality improves without data crossing the boundary.

"Could we allow one-way telemetry out, just usage counts?" Possibly, and it is worth asking for, but treat it as a security decision, not a convenience. Offer the smallest version: a daily counts file the customer's own staff export and release, so they stay in control. Do not build any outbound connection into the product, even a disabled one, because the reviewers will find it and reasonably ask why it is there.

"They now want a bigger model than the GPUs can hold." Name the three real options plainly: a more aggressively compressed version of the model (with its measured quality cost from the eval set), a smaller model with a narrower task, or more hardware, which is the customer's procurement timeline and not yours. Show the numbers from the eval set for each so the decision is theirs and informed.

"How do we know the bundle you delivered is the one we reviewed?" By the manifest: every file has a checksum, the manifest itself is signed or hashed with the value communicated separately, and the install script refuses to proceed if anything differs. That answer also tells the reviewers you have thought about the carry-in as the attack surface it is.

How to say it in the interview

"In a normal deployment, a missing library is a thirty-second fix. Inside an air gap it can be a two-week round trip, so my plan is organized around not discovering things late. Before I build any assistant, I want to learn what this environment can actually run, and I want to prove that with the smallest thing I can carry in."

Checklist

Practice this interactively
Share this lessonWhatsAppLinkedInX

Related lessons