Skip to main content

Data Retention

RAG-DocBot applies privacy-preserving defaults to conversation history, logging, and log file management.


Conversation History

SettingVariableDefault
Auto-purge after N daysRAG_CONVERSATION_MAX_AGE_DAYS90
Maximum turns per conversationRAG_CONVERSATION_MAX_TURNS100

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

SettingVariableDefault
Anonymise user identifiers in logsRAG_LOG_ANONYMISEtrue
Redact query text from logsRAG_LOG_REDACT_QUERIEStrue

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.