Skip to content

Insights

Data security in enterprise AI systems

How do you design an AI assistant that queries business data safely? Concrete principles on prompt injection, data minimisation, read-only tools and Turkish data protection law.

C-SOFT Editorial · Research

Data security in enterprise AI systems

How do you design an AI assistant that queries business data safely? Concrete principles on prompt injection, data minimisation, read-only tools and Turkish data protection law.

A business owner can now ask on WhatsApp, "Which jobs are due for delivery today?" and get an answer. Behind that convenience is a serious question: once you give an AI access to your business data, how do you control where that data goes, to whom and in what form? This article shares the principles we applied when designing AIP One's business assistant, together with the sources behind them.

Four core risks

  • Prompt injection. It tops OWASP's risk list for LLM applications. In the direct form, a user tries to steer the model with their own message; in the indirect form, the model is influenced by hidden instructions in external content such as a web page, a file or a customer message. OWASP also says plainly that it is unclear whether fool-proof prevention exists.
  • Sensitive data leakage. Any field sent to the model can show up in its answer. Prices, costs and personal data should never reach the model.
  • Excessive agency. If an assistant can change data, send messages or start payments, so can a successful injection.
  • Fabrication. A model may guess an amount or a person it doesn't know. In business data, a wrong number is worse than no answer.

The principles we apply

1. Data minimisation. Turkey's Law No. 6698 requires personal data to be relevant, limited and proportionate to the purpose for which it is processed. The Turkish Data Protection Authority's guide on generative AI reminds controllers that this applies across the whole life cycle of an AI system. In practice: tool outputs pass through a sanitiser before reaching the model, and price and cost fields are removed.

2. Read-only tools. Every tool the assistant can use only reads. It can tell you the status of an order but cannot change the order or message anyone. If something needs to be done, the user does it on the application's own screen.

3. Authorisation in code, not in the model. The model requests a tool; the application runs it and checks permissions. The user's identity comes from the session, not the conversation. If the WhatsApp number writing in doesn't match exactly one active staff member, the AI isn't used at all and a fixed reply is sent. Staff only see work within their own scope; if someone asks for another customer's balance without permission, the tool doesn't invent an amount, it says permission is missing.

4. The database does the maths. The model doesn't add up "total unbilled work this month"; a database query does, and the model only explains the result. The daily management briefing works the same way: facts are gathered by queries first, and the AI only puts them into sentences.

5. Matching that doesn't guess. If there are two people called Ahmet, the assistant doesn't pick one; it shows the candidates and asks which one.

6. The model doesn't write links. Links and action buttons in answers are generated from the application's own routes, so the model can't send a user to another address, even under injection.

7. Limits and logs. The tool-calling loop is capped at three rounds, there are per-minute and per-day rate limits, and usage and cost are reported per model.

8. Provider independence. The text model provider sits behind an abstract interface, and the business can switch provider from the admin panel without a code change. It isn't a security control, but it is a risk decision: if one provider's policy, pricing or availability changes, the business isn't locked in.

Questions to answer under Turkish data protection law

Before starting an AI project, have written answers to these: which personal data goes to the model, for what purpose and on what legal basis, what the transfer relies on if the provider is abroad, how long and where conversation logs are kept, and how the people concerned are informed. This article is not legal advice; have your own project reviewed by a lawyer.

A short checklist

  • List every field sent to the model and write down why it is needed.
  • Design tools as read-only first; if write access is needed, add human approval.
  • Mark external content (customer messages, web pages, files) as data, not instructions.
  • Leave authorisation to the application, not the model.
  • Test the model as an untrusted user and add known injection examples to your test set.

We describe the assistant built on these principles on the AI business assistant page, and our experiments with agent design in the Agent systems Labs note.