Chapter 6 · Practice 3 of 4
Send the model only the data the task needs
Why it matters
Every field you put in a prompt can leak through the answer, a log or a provider. Send only what the task needs.
- Load only the current user's data.
- Select the fields the task needs rather than whole records.
- Keep data from different customers or tenants in separate calls.
Outside the code:
- Read your provider's data usage and retention terms, and pick the settings or agreements that match your obligations.
- Tell users in plain words when their content is processed by an AI model and, where it applies, offer a way to opt out.