---
title: "Train only on data people agreed to share · Agent Wranglers"
url: https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback/consent-before-training
updated: 2026-10-20
licence: "All rights reserved"
---

# Train only on data people agreed to share

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Required
- Chapter: [Logs, privacy and feedback](https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback)
- Rule: Use customer prompts, answers or documents to train a model only with a recorded legal basis, such as consent. Never send them to a provider that trains on them by default.
- How: Store a training flag per user or per customer account, off by default. Build training sets only from rows where the flag is on, and remove personal data first. Choose provider plans that do not train on your data, as in [send models only the private data they need](https://agentwranglers.se/playbook/adversarial-testing/ai-agents-and-models/private-data-to-models). Say in the privacy policy whether data is used for training and how to opt out. If you never train or fine-tune a model, only the provider part of this rule applies.
- Check: The script that builds training sets selects only rows with the flag on. A test with one opted-in and one opted-out user produces a set with only the first user's data. The terms of each provider plan in use say it does not train on your data.

Example:

```sql
SELECT count(*) FROM training_examples t JOIN accounts a ON a.id = t.account_id WHERE NOT a.allows_training;
-- PASS when the count is 0
```

```ts
const rows = await db.query('SELECT prompt_redacted, answer_redacted FROM ai_call_text t JOIN accounts a ON a.id = t.account_id WHERE a.allows_training');
```

```python
rows = db.execute("SELECT prompt_redacted, answer_redacted FROM ai_call_text t "
                  "JOIN accounts a ON a.id = t.account_id WHERE a.allows_training").fetchall()
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers ai features playbook: https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback/consent-before-training`.

- Previous: [Collect feedback on every answer](https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback/feedback-on-every-answer)
- [Logs, privacy and feedback](https://agentwranglers.se/playbook/ai-features/logs-privacy-and-feedback)
