Machine Learning for Marketers

Machine learning can be used together with other tools like APIs or Databases to solve interesting challenges, all of which you can write yourself.

Source: Unsplash.com

Source: Unsplash.com

In this article, we hope you’ll discover how easy it is to:

  • Use the new GPT-3 model

  • Aggregate social media posts on Twitter or Reddit and define, attribute and sort posts by content type automatically

  • Present a report of findings to be used in creating replies to garner interest around a product, service or organization

Machine Learning Can Comprehend

The GPT-3 model is a text input > text output system. You provide examples of what you’re looking for along with an unanswered question or statement for the model to respond to.

Machine-1.jpg

Example content is provided In the script below, along with a question to give the GPT-3 model an idea of:

  1. What kind of information to look for

  2. What format of response to give back

  3. What information we need

Machine-2.jpg

The model, which is trained on thousands of web sites, including Wikipedia, and online books, parses the example questions with the info request and returns an answer.

You could recreate this functionality with your own machine learning bot, though it would need to be trained to specialize in parsing and responding with certain kinds of ​language​ to meet the needs of your product.

All of this happens in the cloud through Open AI’s API​​. The API is on offer in lieu of the model itself to protect IP and prevent the harmful use of advanced AI. Access is controlled by Open AI so the underlying functionality and the model itself are hidden. This is different from GPT-2 which was open source. The exact format is left up to the user however.

To get GPT-3 to concisely respond to silly statements and questions, you could provide this format:

Machine-3.jpg

Or this one, getting GPT-3 to concisely describe thoughts at different ages:

Machine-4.jpg

Or even this one, getting GPT-3 to give us shell commands using plain English:

Machine-5.jpg

Complex Parsing in Machine Learning

Parsing one liners is a good start, but for our purposes, the model needs to learn to make more associations.

Here we’ll use machine learning in two ways:

First, to generate categories for our social posts to better organize them and, for context, to aid the model in the next step.

Second, to generate responses to the social posts geared towards a call to action. That could be following a link, providing terms for the original user to search online themselves.

Machine-5a.jpg

In the first script below we identify tweets by name, username and text content, then return a one-or-two-word category.

Machine-6.jpg

The format applied here returns a one-or-two-word category:

Machine-7.jpg

What we end up with is a list of tweets with categories which we can now use in the second script to return responses.

This time we feed in different tweets to use as examples because we want to generate responses to the original tweets rather than to a category name.

Machine-8.jpg

This format will return a tweet with a category:

Machine-9.jpg

What we end up with is a list of sortable responses that we can bulk publish to Twitter through their API to generate interest in a topic or grow a channel.

Machine-10.jpg

To add links organically within tweets to make it look like something a human would post you’d need to experiment and refine the examples you send along with the requests so that what’s generated looks realistic.


References

*1​ Based on the ​demo​ from Open AI.

Machine-11.jpg

*2​ Based on the ​API blog post​ from Open AI.

Machine-12.jpg

Oscar

Oscar is our CTO and tech lead responsible for architecting platforms and leading our tech teams

Previous
Previous

The Future of Augmented Reality (AR)

Next
Next

The Entrepreneur’s Guide to Developing Apps