Hello world its Siraj and AI in marketing Thats the topic for todays video I want to start off this video with a demo and what this is is an AI Writer what it does is it takes in as input a keyword in my case, Ill say its gonna be wine, okay So I want to write an article about red wine Im gonna send it to my email address Its gonna use an AI to then generate an article based on that it might take a few minutes It might take a few hours But luckily I already have the output right here for us what it does is it because its gonna generate text.
Based on that keyword and its gonna use its sources are going to be the internet so its going to Search the internet for other related articles on the topic Its gonna take all that text and compile it into one giant Text data set, its gonna feed that into its AI model which is likely an LS TM neural network Dont worry if you dont understand that, Ill talk about that later in the video And then its going to output an article that we see here This could be a very compressed article low compression It could be a very medium or a high compression article and they can get pretty good, okay.
Pretty damn good, so good in fact that its very likely that youve already read an article or seen some kind of data That was created entirely by an AI and you didnt even know it Very famous brands from Fox to Yahoo to The Associated Press all use AI to generate content And thats just one of the ways that AI can be used in both marketing advertising and the entire.
marketing funnel the pipeline so in this video Im going to talk about ways we can do that and at the very end were going to look at some code for different Architectures that we can use to do this ok, so lets start off with The ways that AI can be used in marketing, right so one way is through audience targeting right so if you have some startup a company a brand you have an audience of Customers right and if you have some new product you want to target the specific subset of your customers theyre going to be most.
willing to convert into sales You dont want to waste your time your energy your money your resources on customers who wont convert right and so How do you target those exact customers that would be most likely to convert? This is a perfect use case for AI and well talk about that in a bit The second part is content creation right if youve already Targeted those users that are most likely to convert to sales for your product How are then you? How are you supposed to generate content? That would be best suited for them the ideal, the easy way is to get a human to do it.
But could you get an AI to do it is the question and the answer of course, is yes And well talk about that as well Now real time optimization is another strategy using AI Lets say you have some marketing campaign lets say its an email campaign, right and youre constantly setting ads out to your users to see how they feel about the product and Youre getting feedback from them Whether they like it or not how do you optimize that content or route in real-time so that youre learning from what your users like and what they dont like and.
This has been happening like I said for a very very long time and were gonna learn how in this video So some b2b marketers were asked What are these metrics that indicate successful return on AI investments and across the board that the number one way with 59% of respondents saying this was that it gives them better close rates for sales so sales equates to revenue and revenue is the lifeblood of any company right,.
you cant have a company if you dont have revenue Okay, so if I didnt have revenue I couldnt hire people I couldnt make videos for you I couldnt live Ive got revenue, okay So and I am using AI to help target my content So I myself in and mitting that Im using AI to help target, and you know make sure my content is as Targeted as possible And they say in the end if you have some product that youre selling its going to then help close the rates for sales.
Right for me for me That was my decentralized applications course That was my only paid offering up to this point, and I targeted it very well, and it resulted in some good sales Were just gonna help me grow the business later on So AI can be used for that as well So lets talk about some startups in the space that are helping to move this field forward right so Appier is one example This is a Taiwan based company and What they do is they predict what audience members are likely to do next right so if you have some products right youre some ecommerce.
Website and youre selling shoes, and youre selling all sorts of clothing Lets say if a customer buys shoes, then it is likely that the customer wont buy another pair of shoes But it is likely that theyll buy a pair of socks to complement those shoes How can you predict what the customer is going to do next and what they do is they provide AI as a service to companies?.
To allow them to predict, what customers are going to do next? Another example is drawbridge, right? so users switch devices all the time right so they can be on mobile they can be on a desktop they can be on a ps4 and ideally we can talk we can target the type of Content to the specific device that theyre on at the time, and so thats what drawbridge does it predicts What times that a user is going to be on a specific platform? And then it allows a brand to create content base on that platform.
another example is insidesales com Right so if you have a lot of prospective sales You cant just target all of them because youre gonna be wasting time and energy and money on targeting this giant segment of users When it turns out that the the customers that are most likely to convert are probably only 20% And thats what Inside Sales does is it helps you find that 20%? of your customer base that are gonna be the most likely to convert to the sales for your product that youre pushing and theres one more.
I want to talk about its called Persado and what they do is they will Help you create content It will help you find the phrases and the words thats going to drive the greatest action for your audience that convert into sales So you could say you know a text message in this way But if you say it in this way you reword it a little bit Its going to increase sales by this much.
And this is something that we humans try to do we use our intuition right so you know Don Draper from Mad Men He comes into the boardroom Hes like this is gonna work, and then it works, and its beautiful Thats not how it works anymore if you dont have a database decision What are you doing right so? Really, good marketers and really good You know sales people an advertiser, not sales advertisers tells people as well But not in this case use AI to make decisions.
Okay Its not just about intuition alone Youve got to use it Youve got a base your decision on the data If you dont got the data You dont got sh anything right so shit so anyway, so Lets start with audience targeting right so how do we target some segment of the audience? That is gonna be most likely to convert for a given ad and then focus all of our time and energy on that segment.
So we could think about this as a recommender system problem right so a bunch of sites use recommender systems Amazon Netflix You know everybody uses it these days and one very common way to build recommender systems is to use matrix factorization Okay, so heres how it works if you have some product and in this case were talking about marketing so our product is going to be a an ad right so you have a bunch of ads youve tried out and the users rated all of those ads on a.
Scale of one to ten and what this turns out is you have a giant matrix of users and Ads and their ratings for all of those ads so it turns out that those users arent going to rate all of those ads Theyre only going to rate some of them So what we do for matrix mean factorization is we decompose this giant matrix into two different matrices One is going to be how a users rates certain features of an ad the other is going to be how? Certain features are rated by users for a specific.
ad so two different matrices the process of decomposing this matrix into a two different feature matrices is a Type of machine learning using neural networks or SVD is but Ive talked about that before If you search Siraj recommender system on youtube youll find a bunch of videos there, but I want to give you a high-level Explanation here once Weve decomposed that giant matrix into these two smaller matrices We then use the dot product to combine them again in such a way that all of those blank spaces are filled right so what?.
Were trying to do is were trying to find those blank spaces If a user has rated a certain ad this way and another ad this way How would they rate this ad and so this is a prediction, this is what the AI is doing using me factorization? And so a popular library to do this has been LightFM Ive made a video on that before where it takes it generates user and item representations by functioning as a factorization machines and.
Learning the linear embeddings for each feature it then takes a dot products of each of these two representation vector and gets a score But with deep neural networks We can improve on this by creating more meaningful Representations right deep neural networks outperform all other machine learning models when it comes to learning features, ok so when it comes to learning features deep neural nets blow everything else out of the water if we have enough data and computing power and so TensorRec is a Library that has a lot of developer activity and I highly recommend it built on top of tensor flow.
That does this, it allows us to use tensor flow to build deep neural networks for Recommendation engines this could be to recommend the optimal ads for your users to recommend products to recommend whatever it is Now ideally if youre a brand if youre a company youve got some data Set that shows How users feel about certain ads youve done in the past and based on that you can create new ads that a certain user would.
be likely to convert on so you have to make sure you have that data If you dont have that data your startup you want to build a service for brands than just Google data set For data set ad campaign and then test it out from there But the idea is that going beyond matrix factorization we can build neural networks to do this Right and so the process is very similar in that we are learning to matrices.
And then were performing a dot product between those two matrices To create predicted scores for a given user and then we just read off of that matrix to predict what a certain user would score a particular ad and then if we have some threshold like if a user scores would score above an Eight out of ten for this ad then deploy this ad to them if its under that then deployed this ad to them okay So its kind of like that so there are four steps in this process.
The first one is to transform our input data into feature tensors for easy embedding right we have some input data Thats a giant matrix, and then we use Pandas say to then convert that into a data frame object And once we do that we convert them to feature tensors using an algorithm like Word 2 Vec which we could use in one line of code or Several other ones and then once we have that we transform the user item feature tensors into user item representations.
we transform that pair into a prediction and then transform that prediction and truth value into a loss Value for a loss function minimize that using gradient descent until we have reached a minimum minimal loss function value And then we can use that model to predict what a certain user would like so here is a very simple programmatic example of us using TensorRec to.
Recommend users a specific type of data This could be ads it could be anything right so we build the model in a single line Thats all we imported We generate some dummy data We fit them up model on that data We predict What the scores would be would be based on the given data, and then we use a percentage recall as a.
Evaluation metric to see how good its doing on testing data set thats it TensorRec check it out Now, once we have targeted a specific subset of our users that we know exactly Weve automated that part of the pipeline now We can use humans to create content that is perfectly well suited for them or We could automate the entire pipeline where its not just.
Us targeting the users using a I will generate content for those users using AI so the entire process Is automated right, so this video is content this video could be automated Who knows if Im real or not right you have no idea unless you met me in real life But even then who knows maybe I was a hologram anyway content creation right so LSTM.
Networks are the way to do this for text, okay, so If you search LSTM Network Siraj youll find a great video on me explaining how they work in depth But Ill give you a high-level overview right now so Recurrent networks are really good at predicting sequences of of text right so normal feed-forward networks, right? Normal feed-forward networks are not about predicting sequences Theyre about predicting what an output would be for a given input it learns the mapping.
But when it comes to a sequence what happened before? Matters to what happens now what the words that you had previously like I like recording videos About AI because I love you know maybe its tensorflow But predict what that word is you got to know about the word AI you got to know about the word video You cant just know you know Use the previous word you got to use the whole sequence right so what were current at works, too.
Is that every time step, Its not just the next data point Thats fed into the network Its also the previous hidden layer Thats learned over time Thats fed into the time step and so at every time step Not just a new data point, but the previous hidden layer That was learned is fed into the network so its learning not just the next data point.
But its learning based on what it already learned before if that makes sense and thats why its called a recurrent Network Because there is this recurrence or feedback loop Thats happening and whats theres a problem though in that for recurrent networks if the sequence is Too long then theres gonna be a problem called the vanishing gradient problem So during optimization back propagation we use the gradient Which is the difference between the real output and the predicted output we use the gradient to then update all of those layers beforehand?.
but what happens in recurrent networks is that the gradient gets smaller and smaller and smaller the further back we go in the network and So how do we preserve that gradient so all the layers are updated accordingly? Well, we need to trap that gradient somehow into what are called long short-term memory cell, cells that consist of gates values and these gates Trap the gradients in such a way that the vanishing gradient goes away And this allows a network to remember very very very long term sequences of data like an entire essay right so they lets us then write an entire essay or article and.
So you might be thinking how do I build this very complex thing and the answer is Keras, Keras is a machine learning library, Built on top of Tensorflow that lets you build very complex Deep neural networks in just a few lines of code and AI marketers can use this to automatically generate Content best suited for a particular subset of their audience so the idea is that if you have images or video Then you want to use generative adversarial networks that generates content if you want to generate audio you use wavenet.
And if you wanted used if you want to generate text, you use LSTM current networks like Im talking about here and remember I have videos for all of these models Just search my name and the model So heres a very simple example of us using Keras in Under a hundred lines of code to generate an essay in the style of Neitzche So the text is Neitzche writing and then what it does is it takes that input data.
Its formats that data It feeds it into a model built in Keras where every line of code Corresponds to a single layer in the network, so its very readable code, and its only three layers long We optimize it using rmsprop Which is a type of gradient descent search which activation function should I use Siraj on Youtube to find a great video on all the differences between all of the different activation functions out there You know I also have a video on which optimization function should you use as well?.
but anyway once we do that we minimize it using a loss function and Thats it and then it what its going to do is its going to predict every word that that neech a would have said based on what its learned in the past and So we can use this for the entire pipeline whether were targeting users And then once weve targeted them generating content for them and we can do this for the entire marketing pipeline theres a huge huge space for startups to come into this space and.
Create services for big brands for consumers to help them optimize to save time to save money to save resources Using the latest technologies and look even though I said that there are some startups out there that do this currently Theres a giant massive opportunity for new players in this space, and theres a huge need for it as well So I hope you found this video useful Please subscribe for more programming videos and for now Ive got a B nai so thanks for watching.
Leave a Reply