Data Retention
RAG-DocBot applies privacy-preserving defaults to conversation history, logging, and log file management.
Conversation History
| Setting | Variable | Default |
|---|---|---|
| Auto-purge after N days | RAG_CONVERSATION_MAX_AGE_DAYS | 90 |
| Maximum turns per conversation | RAG_CONVERSATION_MAX_TURNS | 100 |
Conversations older than RAG_CONVERSATION_MAX_AGE_DAYS days are automatically purged. Each conversation is also capped at RAG_CONVERSATION_MAX_TURNS turns — older turns are removed as new ones are added.
Log Anonymisation
| Setting | Variable | Default |
|---|---|---|
| Anonymise user identifiers in logs | RAG_LOG_ANONYMISE | true |
| Redact query text from logs | RAG_LOG_REDACT_QUERIES | true |
By default:
- User identifiers are anonymised in all log output.
- Query text (the content of user messages) is redacted from logs and never written to disk.
Log Rotation
Log files are automatically rotated — no manual intervention is required.
Temporarily Disabling Anonymisation for Debugging
If you need to inspect full log output for debugging purposes, you can temporarily disable anonymisation:
RAG_LOG_ANONYMISE=false
RAG_LOG_REDACT_QUERIES=false
Restart the backend after changing these values:
docker compose up -d backend
warning
Re-enable RAG_LOG_ANONYMISE and RAG_LOG_REDACT_QUERIES after debugging.