Logs, privacy and feedback Required
Train only on data people agreed to share
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 to do it
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. Say in the privacy policy whether data is used for training and how to opt out.
Example
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
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');
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()
How to 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.
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.