KVKK compliant AI architecture: where should the data live?
In an AI project that involves personal data, the first question is not which model to use but where the data will live. It is a decision that cannot be changed later: once the architecture is built, changing the hosting model means rewriting the system.
Note: KVKK is Türkiye's Personal Data Protection Law (Law No. 6698). This article is an architectural guide, not legal advice. Make compliance decisions together with your legal counsel.
What are the three architectural options?
| Approach | Where the data goes | When it fits | Main cost |
|---|---|---|---|
| Masking + cloud model | Text with personal data removed | When personal data adds nothing to the answer | Maintaining the masking layer |
| Regional enterprise cloud | The provider's EU region | When contractual safeguards are enough | Dependence on the provider |
| Open model on your own infrastructure | Nowhere | When data leaving is not acceptable | Hardware and operating burden |
When is masking enough?
In most enterprise scenarios, personal data travels in the context without adding anything to the quality of the answer. Summarising the terms of a contract does not need the other party's national ID number; classifying a support request does not need the customer's name.
A masking layer replaces personal data with placeholders before the text goes to the model, and puts it back when the answer returns. Set up properly, it lowers both the risk and the token cost.
The limit of masking is this: when the personal data is the answer, masking does not help. In "what are this customer's past requests?", the identity is at the centre of the question.
What does regional hosting solve, and what does it not?
The major providers offer data processing in a European region, and their enterprise tiers commit that the data you send is not used for training. For many organisations that is a sufficient level of assurance.
What it does not solve is that the data has entered a third party's system. In some sectors and under some contracts, that is unacceptable regardless of technical safeguards. At that point the discussion is no longer about architecture but about compliance, and legal makes the call.
Is running a model on your own infrastructure realistic?
As of 2026, open weight models match what closed models could do a few years ago on many enterprise tasks. For document question answering, classification and summarisation, the gap is acceptable for most uses.
That part is realistic. The unrealistic part is assuming the cost is zero. When you run the model on your own infrastructure, GPU hardware or rental, the work of updating models, and responsibility for scaling and outages all move to you. With constant, high volume use, the total cost of ownership can fall below the cloud; for an internal tool used now and then, it usually does not.
Where does data leak?
Even in carefully designed systems, leaks usually come from one of these three places:
- Logs. Debug logs store the prompt and the answer in plain text. This is the most often missed point.
- Evaluation sets. Real user queries are copied as test data, and that copy now sits outside access control.
- The vector database. Embeddings are assumed to be "anonymous", yet in most setups the original text sits right next to them as metadata.
Architecture checklist
- Write down, as a table, which class of data goes where, and get legal sign-off on it.
- Index access control at the level of the document chunk: filter at query time, do not hide afterwards.
- Put logs behind the masking layer and define a retention period.
- Treat the vector database with the same security classification as the main database.
- Test that a deletion request reaches the vector index too: if a record deleted from the main table stays in the index, you are not compliant.
- Read the provider contract for the product you use; consumer interface terms and API terms are not the same.
Summary
The right question is not "cloud or our own server" but "which data really has to go to the model". In most projects, an honest answer shows that only a very small part needs to be sent, and at that point the compliance discussion becomes a much easier one.
Frequently asked questions
Can I send personal data to a cloud-based language model?
The legal answer depends on the specific case and should be settled with your legal counsel. The architectural answer is this: if it does not need to be sent, do not send it. In most scenarios personal data travels in the context without adding anything to the quality of the answer; in that case masking lowers both the risk and the cost.
Does it make sense to run an open model on our own servers?
If the requirement that no data leaves the building is strong, yes, but the cost has to be discussed up front: GPU hardware or rental, the work of updating models, and operational responsibility all move to you. With constant, high volume use the total cost can fall below the cloud; at low volume it usually does not.
Will our data be used to train the model?
In the enterprise and API tiers of the major providers, data you send is committed not to be used for model training. That commitment varies by product and plan, though, so read the contract for the product you actually use. The terms of consumer interfaces and of the API are not the same.
Do logs count as personal data too?
If a user query contains personal data, the log that stores that query contains personal data as well. This is the leak point most often missed in AI systems: the architecture is built carefully, but debug logs keep everything in plain text.
Do we need a privacy notice?
As with any system that processes personal data, there is an obligation to inform, and the use of AI is expected to be stated clearly. Settle the scope and the wording with your legal counsel; this is a compliance decision, not an architectural one.
Enterprise AI
AI that runs on your ERP data and survives production.
Related notes
Note RAG or fine-tuning? Making the right call in enterprise AI projects
In most enterprise projects the right answer is RAG. Fine-tuning does not teach a model new knowledge; it teaches behaviour and format. Use RAG when your information changes, when answers must cite a source or when your document volume is large. Add fine-tuning when you need a fixed tone, format or domain language.