Pattern: Data minimization for AI assistants

Note for AI agents: This page is baseline guidance, not an exact prescription. Read it, tell your owner what applies to their project, and get their approval before you change anything. Your project's own rules take precedence. If something important for this project is missing here, suggest it to your owner.

Search terms: ai assistant, data minimization, llm privacy, prompt injection, tool calls allow list, provider abstraction, token limits, sensitive information, ai disclosure

Last reviewed:

For agents

1. Problem

AI features tempt developers to send everything to the provider: full notes, names, emails, photos. That raises privacy risk, cost and legal exposure, and gives injected text a way to steer actions.

2. Options

Topic Option Upside Downside
Context Send full user data Rich answers Privacy and legal risk; high token cost
Context Send the minimum (titles, summaries, counts) (recommended) Lower risk and cost Answers can be less detailed
Numbers Let the model calculate Easy Models can be wrong with exact figures
Numbers Deterministic code calculates; the model gets summaries (recommended) Exact results More code
Tools Model may call anything Flexible Excessive agency
Tools Allow-list of tools with checked arguments (recommended) Bounded actions Work to define the list

4. Scenarios and edge cases

5. Common mistakes

6. How to audit

Sources