How AI analyzes attachments