What is Phone Number Policy?
Phone number policies specifically detect and anonymize phone numbers in various formats (US, international, etc.).Why its Important?
Phone number policies are essential for protecting user privacy and preventing phone numbers from being exposed through AI interactions. These policies prevent phone numbers from being sent to LLMs, which helps maintain user privacy and protects against spam, harassment, and identity theft.- Prevents sending phone numbers to LLM: Blocks phone numbers from being processed by language models, protecting user contact information
- Protects user privacy: Prevents phone numbers from being exposed to third-party LLM providers or stored in training data
- Reduces spam and harassment risk: Anonymizes phone numbers to prevent them from being used for unwanted communications
Anonymize (Unique Random Placeholders)
AnonymizePhoneNumbersPolicy replaces detected phone numbers with unique random placeholders. Original values are restored in the agent’s response:
Streaming
Phone number policies work with streaming — anonymized phone numbers are de-anonymized token-by-token in real-time:Async
Available Variants
AnonymizePhoneNumbersPolicy: Pattern-based detection and anonymization with unique random replacementsAnonymizePhoneNumbersPolicy_LLM_Finder: LLM-powered detection for better accuracy

