These days, few meetings about enterprise software end without someone asking: "Can we make this smart too?" An assistant that answers users' questions, a report that writes itself, a form that fills itself in from a scanned document. The request is reasonable, and the tools are within reach.

The trouble starts with the next sentence: "But our data can't go anywhere." Customer records, contracts, case files and internal documents are exactly what the AI feature needs to work on, and exactly what the organization doesn't want sitting on someone else's servers.

We usually see two wrong reactions to this tension. The first is a blanket ban, which is what Samsung did in May 2023 after engineers pasted internal code into ChatGPT. The second is not thinking about it at all: an API key goes into the code, and whatever a user types is sent straight to the model. The right path lies between the two, and it depends far more on your software architecture than on which model you pick.

This article is for CTOs, product leaders and business owners who want to add AI to custom software without losing control of their data. We look at it the way the people who build the software do: where the feature sits in the system, which path data takes, and where it has to be stopped. Running models on your own hardware, and what that costs, is a separate topic covered by Dropp Cortex.

Summary for leaders

  • "Without sending data out" can mean three different things: no data leaves at all, no sensitive data leaves, or data leaves but the provider doesn't keep it. Decide which one you mean before any technical decision.
  • Don't start with "AI". Start with one specific feature and work out exactly which data it needs. Most features need less data than you'd expect.
  • Classify your data and give each class a route: straight to a cloud model, to a cloud model after scrubbing, to a local model only, or not to AI at all.
  • Every model request should go from your back end through a single AI gateway, where keys, routing rules, data scrubbing, budgets and logs are controlled.
  • The model must never see what the user isn't allowed to see. A large share of data leaks in AI systems start right there, not on the model provider's servers.
  • A zero data retention (ZDR) agreement helps, but it doesn't replace architecture. Its terms can change, and it isn't available for every model.

What does "without sending data out" actually mean?

When an organization says its data must not leave, it usually means one of three things. Each needs a different architecture:

  1. No data leaves the organization's infrastructure. The model has to run on the organization's own servers or in a dedicated private environment. This is the strictest option, and it's required for classified data, air-gapped environments and some regulated industries.
  2. No sensitive data leaves. Part of the work can go to a cloud model, as long as personal and confidential information is removed or replaced before it's sent. Most features in enterprise software fit here.
  3. Data leaves, but isn't retained or used for training. This is a promise the provider makes in a contract, not something your architecture guarantees.

Be precise about the third option. OpenAI says it doesn't train on data sent to its API, but by default it keeps abuse monitoring logs for up to 30 days. Excluding your data from those logs (Zero Data Retention) is available only to customers whose request has been approved. Anthropic, from 9 June 2026, requires 30-day retention of prompts and outputs for its most capable models. So even with a ZDR agreement, the strongest models may fall outside it.

For whoever builds the software, the conclusion is simple: a contract is one layer of protection, but the architecture shouldn't depend on it. If some data really must not leave, it has to be stopped before it reaches a cloud model.

Step one: a specific feature, not "AI"

"We want our software to have AI" isn't a requirement. A requirement is a specific user, in a specific workflow, doing a specific task faster or better. Until the feature is clear, you can't know which data it needs, and until you know that, you can't make a decision about protecting it.

Most AI features requested in enterprise software fall into one of four patterns:

Feature Example Data it touches Data protection note
Extraction and classification Reading fields from a form, invoice or document; routing requests and tickets The input document or text, often full of personal data Output is structured and easy to validate; a smaller local model often handles it well
Summaries, drafts and reports Case summaries, draft replies, periodic reports Structured database data plus text Send only the fields the report really needs; replace identifiers
In-app conversational assistant Answering users' questions about the system's own data or processes Whatever the user types, plus whatever the system retrieves to answer Free-form input is hard to predict; it needs both input scrubbing and access control
Search and Q&A over documents (RAG) Asking questions about policies, contracts or a knowledge base The document passages relevant to the question The main risk is a document reaching the model that the user wasn't allowed to see

One question helps more than any other: what is the least data this feature needs to work properly? A report analyzing monthly sales trends doesn't need customers' names and phone numbers. Classifying a support ticket doesn't need the sender's national ID number. The best way to scrub data is not to send it in the first place.

Step two: classify data and give each class a route

Classification doesn't need to be complicated. For most software, four classes are enough, and each can have a clear rule:

  • Public: website content, product documentation, published text. Can go straight to a cloud model.
  • Internal: working data and text that isn't confidential but isn't public either. Can go to a cloud model through the gateway, under an appropriate contract.
  • Personal and confidential: names, phone numbers, ID numbers, account numbers, addresses, contract details and anything that reveals a person's identity or a trade secret. Goes to a cloud model only after scrubbing, or to a local model.
  • Classified or regulated: data that law, contract or company policy won't allow out, even scrubbed. Local model only, or no AI on it at all.
Four data classes and the route each one takes to a model

Agree this table with the data owners before writing code, not after. Classification is a business and legal decision, but enforcing it is the software's job. If each field in the data model carries its class, the AI layer can decide by itself which data goes where.

Architecture: where does the AI feature sit?

An AI feature isn't an API call tucked into a corner of the code. It's a full layer in the back end with a few distinct parts. The earlier these parts are designed separately and clearly, the easier it is to add the second and third feature, and the tighter your control over data.

The AI layer in the back end: from the user's request to the model and back

1. Everything from the back end, nothing from the browser or app

A mobile app or web front end should never talk to a model directly. An API key in client-side code can be extracted, and when the request goes from the browser, none of the controls below run. Every request should pass through a back-end service that knows the user's identity and permissions. Some providers now enforce this: for organizations with a ZDR agreement, Anthropic rejects requests made directly from a browser and expects them to come from the organization's own back end.

2. Scrub data before it's sent

For structured data, scrubbing is straightforward: don't send fields you don't need, and replace identifiers with meaningless values. "Customer 48217" works just as well as a real name for analyzing a case.

Free text is harder. A user who types "summarize the file for Mr. So-and-so, ID number such-and-such" into an assistant has put personal data where no field was defined for it. This is where PII detection tools come in. One of the best known is the open-source Microsoft Presidio, which finds names, numbers and known patterns and replaces them with labels. LiteLLM, an open-source AI gateway, can run Presidio before every call and, once the response arrives, put the original values back in place of the labels. The model only ever saw <PERSON>, but the user reads the answer with the real name.

One important caveat: Presidio's default configuration covers English only. For other languages, and for local formats such as national ID numbers, bank account numbers, phone numbers and addresses, you have to add your own recognizers and suitable language models, then test them against real data. Scrubbing that hasn't been tested only gives a feeling of safety.

3. One gateway for every model (AI gateway)

Put a single gateway between your software and the models. The software only talks to the gateway, and the gateway decides which model a request goes to. The benefit is that every control is applied in one place:

  • Keys: provider keys live only in the gateway. Each feature or service gets its own virtual key, which can be limited or revoked.
  • Routing: the rule "confidential data goes to the local model only" is enforced in the gateway, not in each feature's code.
  • Budgets and limits: each feature gets a spending and request cap. One faulty loop in the code doesn't blow up the monthly bill.
  • Logs and tracing: you can see which feature called which model, for which user.
  • Switching models: if a model gets more expensive, its quality drops or access to it is cut off, only the gateway configuration changes, not the software.

A warning: gateway logs are sensitive data too. If you store full request text, you've collected the very data you stopped from leaving in a different place. Either scrub the logs as well, or keep only metadata (which feature, which model, how many tokens, how long it took).

We use the same pattern for our own team at Dropp: LiteLLM sits in front and manages users, keys and budgets, and 9Router sits behind it, routing between providers and failing over when one has errors. The team's coding tools, automation workflows and internal assistant all reach models through this gateway. We describe the stack in detail in Dropp's internal AI stack.

4. Route by data sensitivity

Once data classes are defined, you don't need one choice for the whole system. A common, practical pattern is a hybrid architecture: requests carrying classified data go to a local model, and everything else, after scrubbing, goes to a cloud model, which is usually stronger.

This split also works for quality. Tasks like extracting fields from a form or classifying text, where the output is structured and can be validated, are often handled well by smaller models running on the organization's own servers. Tasks like writing long analytical reports or answering open-ended questions benefit more from larger models. What hardware running a model in-house requires, and what it costs, is covered on the Dropp Cortex private AI page.

5. The model only sees what the user is allowed to see

In the list of top risks for LLM applications published by OWASP, sensitive information disclosure rose to second place in the 2025 edition, right behind prompt injection. Much of this risk has nothing to do with the provider's servers and happens inside your own software: an assistant with access to every case file answers a user who should only see their own cases, using data from other people's files.

The rule is simple and shouldn't have exceptions: the AI layer runs with the permissions of the user who made the request, not with a blanket admin account. In document search (RAG), the access filter has to be applied before a document reaches the model, not after the answer is generated. Anything the model has seen once can end up in an answer.

6. Control the model's output too

Model output is untrusted input. If it's going to be written to the database, validate it like any other input. If it's going to trigger an action, like sending a message or changing a record's status, the user should confirm before it runs. Text hidden by someone inside an uploaded document can give the model instructions, and the software shouldn't carry them out unchecked. If your feature will give agents tools, we cover the details in Building an MCP server.

An example from one of our projects

In one of our custom software development projects, we added three AI features to an enterprise application: an in-app conversational assistant, summary and report generation, and extraction and classification of information from forms and documents. All three connect to a cloud model through the gateway, and sensitive data is scrubbed before it's sent. The model works on the content without personal and confidential information leaving the organization.

The client's name and project details are confidential, but the pattern is repeatable, and it's the one described in this article. A few decisions matter most in a project like this:

  • All three features go through one layer. Scrubbing, routing and logging are built once, and the fourth and fifth features are added without rebuilding these controls.
  • Each feature knows its own input. For extraction and reports, the software knows exactly which fields it sends. For the assistant, input is free-form, so scrubbing free text matters more.
  • No dependency on a single model. Because the software only talks to the gateway, if part of the traffic ever needs to move to a local model, the features' code doesn't change.

When do you need a local model?

A scrubbed cloud model is enough for most features, but not all. These conditions usually call for a local model or a private environment:

  • Data that mustn't leave even when scrubbed. Law, contract or company policy explicitly forbids it.
  • Text where identity is in the content itself. In some documents, you can tell who or which project they're about even with names and numbers removed. Scrubbing such text isn't reliable.
  • No internet, or unreliable connectivity. When a feature has to work under all conditions, it can't depend on a service outside the organization's control.
  • High, repetitive volume. A simple task run thousands of times a day, like classification or extraction, may be cheaper on the organization's own hardware.

A local model isn't free of trade-offs. Models that run on reasonable hardware are usually weaker than the strongest cloud models, and their quality varies a lot by language. Before deciding, test each feature on the local model with your own real samples. Dropp's private and sovereign AI service is built for these organizations.

Measure quality and cost from day one

A feature that works well today can quietly get worse when the model changes, a prompt is edited or the data shifts. For each feature, build a set of real (scrubbed) samples with correct answers and test every change against it, just like regression tests for code. This matters even more when you plan to move part of the traffic to a local model. We cover testing in more depth in Software testing and quality assurance.

Track cost per feature, not for the whole application. The gateway shows how much each feature consumes. Most savings come from the first principle: send less data, use the smallest model that does the job, and cache repeated answers.

Plan for regulation and provider availability

  • Data residency rules may decide the route for you. Data protection laws such as the EU's GDPR, and many national laws, restrict where personal data may be processed and under which safeguards it may be transferred abroad. Check with your legal team which classes of data may reach a provider in another jurisdiction, and record that decision in your classification.
  • Provider terms change. Retention rules, model availability and regional coverage all shift. Read the data terms for the specific model you use, review them periodically, and keep the gateway ready to reroute.
  • Plan for outages. A feature that depends on a cloud model needs predictable behavior when the provider is down: fall back to another model, or switch itself off without breaking the software's core workflow. The gateway is where that fallback is defined.
  • Tooling is English-first. Data scrubbing, PII detection and even answer-quality evaluation are mostly built for English. If your users work in other languages, budget time for customizing and testing these tools.

Checklist for adding AI to your software

Before you add the first AI feature to your software, answer these questions:

  1. Which user and which workflow is the feature for, and how will its success be measured?
  2. What is the least data this feature needs?
  3. Has the data been classified, and have the data owners approved the classification?
  4. Is it clear which route each class takes: cloud model, cloud after scrubbing, local only, or none?
  5. Are all requests sent from the back end, with no API key in the app or browser?
  6. Is there a single AI gateway that controls keys, routing, budgets and logs?
  7. Has data scrubbing been tested with real data, in the languages your users actually write in?
  8. Does the AI layer run with the user's own permissions, and in document search, is the access filter applied before a document reaches the model?
  9. Is model output validated before it's stored, and does every action the model proposes require user confirmation?
  10. Do your logs avoid collecting sensitive data themselves?
  11. Have you read the provider's data retention terms for the specific model you use?
  12. How does the software behave if access to the cloud model is cut off?
  13. Does each feature have an evaluation set that runs before every model or prompt change?

Conclusion

Adding AI to software is more an architecture problem than a model choice. An organization that classifies its data, sends every request through one gateway, scrubs sensitive data before it leaves and lets the model see only what the user is allowed to see can use cloud models without losing control of its data. And if one day part of the work has to stay entirely in-house, the same architecture lets that part move to a local model without rewriting the software.

If you want to add AI features to your existing software, or you're building new software where AI plays a role from the start, Dropp's engineering team can work with you from defining the feature and classifying data to building the AI layer, the gateway and the deployment. See private and sovereign AI and AI agents and RAG for details.

Frequently asked questions

How do I add AI to existing software?

Start with one specific feature, not "AI" in general. Identify and classify the data that feature needs, build a back-end service for talking to models, and route every request through an AI gateway. Existing software usually doesn't need a rewrite: the AI layer is built alongside it and connects to it through an API.

Can I use ChatGPT or other cloud models without sensitive data leaving?

Yes, as long as sensitive data is scrubbed before it's sent. Unneeded fields aren't sent, identifiers are replaced with meaningless values, and personal data in free text is labeled by PII detection tools. The model works on the content, and the software puts the original values back into the answer afterwards. For data that mustn't leave even when scrubbed, you need a local model.

Isn't a zero data retention (ZDR) agreement enough?

ZDR is a useful layer of protection, but not every customer or model qualifies, and its terms can change. For example, from June 2026 Anthropic requires 30-day retention for its most capable models. If some data must not leave, your software's architecture has to stop it, not only a contract.

What is an AI gateway and why do I need one?

An AI gateway is a single entry point between your software and AI models. Provider keys, routing to the right model, data scrubbing, per-feature budgets and logs are all centralized there. Without one, every feature has its own controls, and one mistake in any of them is enough for data to leak. Open-source tools such as LiteLLM are built for exactly this.

Are local models good enough?

For tasks like extraction, classification and short summaries, often yes. For long analyses and open-ended questions, large cloud models are usually better, and model quality varies by language. Only evaluation with your own real samples gives a definite answer. Many organizations choose a hybrid: classified data goes to a local model, and the rest, scrubbed, goes to a cloud model.

How much does it cost to add AI to software?

It depends on the type of feature, usage volume and which model route you use. With a cloud model, the main costs are building the AI layer and token usage. With a local model, hardware and its upkeep are added. Either way, sending less data and picking the smallest suitable model for each task save the most.

SHARE YOUR NEED — WE'LL REACH OUT ASAP.

WhatsApp

Message us
Success
Message sent successfully. We will contact you soon.
Error
Error occurred. Please try again later.
Error