Prompt injection and data privacy in AI

AI can follow bad instructions in a file or keep data you send. See what to check before you let it read your files or act for you.

An ink drawing of a padlock, a sealed envelope and a pastel shield.

One AI provider can keep an unsaved temporary chat for up to 30 days for safety. You won't see that chat in your history. That matters when someone on your team pastes in a customer record. A paid API, the connection your software uses to call a model, can have different rules for using and keeping the same record.

Retention tells you how long a provider keeps a copy of what you send. There's a separate risk when the tool reads a file from outside your business. Text in that file can steer the model away from the job you gave it. That's prompt injection.

In brief

  • Keep sensitive information out of tools you haven't approved for it.
  • Check answers against the customer message or source file.
  • Give an assistant access only to the records and actions its job needs.
  • Check training use and retention separately for the plan and features you use.

A file can steer the model even when the user did nothing wrong

In direct prompt injection, the text that steers the model comes from the person using the chat. In indirect prompt injection it comes from material the tool was asked to read, such as a file or web page. The model gets both the task and the material as text, so it can mistake a line in the material for a direction it should follow.

Say you ask an assistant to pull the delivery date from a supplier's attachment. Directions in the attachment could steer it towards a date that doesn't match the delivery terms. Give the assistant permission to update the order and that wrong date can reach the schedule before anyone looks at the reply.

Mark the attachment as outside material and ask the model for the date and the line it came from. That makes the answer easier to check. Keep the power to update the order out of the assistant's hands unless the scheduling system has a separate approval check. A note telling the model to ignore directions in files can't enforce that check.

The assistant's permissions decide how far a mistake spreads

You can use an AI assistant to draft a change without connecting it to the system that carries it out. Once the assistant can decide to use tools on your behalf, it's acting as an agent. Giving it more access or independence than the job calls for is known as excessive agency. The blast radius is the set of records, people or systems a bad decision can affect.

For the delivery job, we'd start with the selected order and let the assistant suggest a date in a draft. We wouldn't connect it to the whole order book just to save staff from opening a record. Read-only access protects records from changes, but the assistant can still show information it can read. Limit which orders it can see as well.

Show the order reference and the old and new dates when staff approve a change. Have the scheduling system verify that the reviewer has access to the order and has approved that specific change. Send any revision to the draft back for approval.

A paid API can keep data it doesn't use for training

Even with the assistant on read-only access, sending an order reference to a model can leave a copy with the provider. On a free consumer chat account, turning off training for eligible chats still leaves regular conversations in your history. To remove a regular chat, delete it separately.

The same provider's commercial API doesn't use inputs and outputs to train its main models by default. Its abuse monitoring logs can include prompts and replies and are normally kept for up to 30 days, with exceptions for legal or safety needs.

On another commercial API, deletion within 30 days is the default for inputs and outputs, but that window doesn't always apply to stored files. Some paid API terms say only that safety logs are kept for a limited period. Ask the provider for the actual window before you send customer data.

Ask which features zero data retention covers on your account. An approved arrangement can exclude inputs and replies from storage on eligible API features, with exceptions for legal or safety reasons. A file store or a connected service may keep its own copy. So might the tool your team uses to record activity, even when the model provider keeps no copy.

You can check one workflow before you share real customer data

Choose a task your team already does by hand. Open the console or admin settings for the account that will run it and have the person who owns that account work through these checks. If you're comparing tools your team already uses, start by checking the AI you already pay for and use the exact plan name in your notes.

  • Write down what the model needs to see. Give it the order reference and date if those are enough. Leave out addresses and payment details.
  • Try an ordinary file with made-up data. Check that the assistant cites the line it used and asks a person to look when it can't find the date.
  • Check what the account can read and change. Confirm it can't see a test order outside its remit or update a record without an authorised reviewer.
  • Look up the rules for storing prompts, replies and files. Ask the provider what gets logged, when it's deleted and which features follow different rules.
  • Give someone the job of turning off access. Make sure they know where to disconnect the assistant, and agree who checks the logs if something goes wrong.

Save the answers next to the workflow and review them again before you connect another app. If you can't find out where a copy goes or who can approve a change, keep the assistant on sample data until you can.

If you're weighing several workflows, our strategy and growth service can help you rank them by value, effort and risk. Book a consultation if you'd like to work through the choice with us.

Keep reading

Book a consultation